Click here to Skip to main content
15,886,110 members
Articles / Web Development / HTML

A Reusable Framework for Connecting Both WebHelp and Compiled Help RoboHelp Projects to Relational Databases Through the Use of JavaScript Object LIterals

Rate me:
Please Sign up or sign in to vote.
2.60/5 (4 votes)
10 May 200518 min read 45.6K   319   16  
This article will describe how to hook up RoboHelp projects to a database to provide data to pages for both WebHelp and Compiled Help using a single architecture. The implementation will rely on the JavaScript interpreter built into almost all web browsers and that is available in Compiled Help too.
<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<head>
<title>Welcome to International Staffing Company Web Help</title>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">
<link rel="stylesheet" href="default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<link rel='stylesheet' href='default.css'>");}
//-->
</script>
<style>
<!--
BODY { font-family:Arial; font-size:80%; }
H3 { color:#000080; }
LI.kadov-H3 { color:#000080; }
LI { list-style:disc; }
-->
</style><script type="text/javascript" src="./DynamicPage_data.js" language="JavaScript1.2"></script>

<script type="text/javascript" style="x-condition: PRODUCTION" src="http://localhost/robohelp/generatedata.asp?cmdSet={vnam:'myData',func:'GetListValues',arg:[1,2,3]},{vnam:'myContact',func:'GetContactInfo',arg:null}" language="JavaScript1.2"></script>

<script type="text/javascript" src="./applicationcontroller.js" language="JavaScript1.2"></script>

<script type="text/javascript" style="x-condition: PRODUCTION" language="JavaScript1.2"><!--
var MyApp = new MyHelpApplicationController(MyHelpApplicationController.DEPLOYMENT_ENUM.PRODUCTION);
// --></script>

<script type="text/javascript" language="JavaScript1.2"><!--
	function RenderList(id) {
		var rv = "<ul>\n";

		var obj = myData[id];

		for (var i in obj) {
			rv += "\t<li>" + obj[i].lookup_desc + "</li>\n";
		}

		return rv + "</ul>\n";
	}

	function RenderContactInfo() {
		var rv = "<div>\n";

		for (var i = 0; i < myContact.length; i++) {
			var rec = myContact[i];
			rv += "<b>" + rec.Label + "</b> : " + rec.Value + "<br />\n";
		}
		return rv + "</div>\n";
	}

	function RenderSiteUrl() {
		return "<a href='" + MyApp.baseUrl + "'>" + MyApp.baseUrl + "</a>\n";
	}
// --></script>

<style type="text/css">
<!--
div.whs1 { x-condition:PRODUCTION; }
hr.whs2 { float:aligncenter; }
div.whs3 { text-align:center; font-size:12pt; font-family:arial; color:red; }
-->
</style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//-->
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
-->
</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
</head>
<body><script type="text/javascript" language="javascript1.2">
<!--
if (window.gbWhTopic)
{
	if (window.addTocInfo)
	{
	addTocInfo("Welcome to International Staffing Company Web Help");
addButton("show",BTN_TEXT,"Show","","","","",0,0,"","","");

	}
	if (window.writeBtnStyle)
		writeBtnStyle();

	if (window.writeIntopicBar)
		writeIntopicBar(1);

	if (window.setRelStartPage)
	{
	setRelStartPage("International_Staffing_Company_Dynamic_Data_for_RoboHelp.htm");
addSearchFormHref("javascript:document.ehelpform.submit()");

		autoSync(1);
		sendSyncInfo();
		sendAveInfoOut();
	}
}
else
	if (window.gbIE4)
		document.location.reload();
//-->
</script>
<h2>Welcome to International Staffing Company Help</h2>

<p>This help system provides information about navigating our web site 
 and using our online services.</p>

<h3>ICS fills positions for the following job types:</h3>

<script type="text/javascript" language="JavaScript1.2"><!--
	document.write(RenderList(1));
	// --></script>

<h3>ICS has placed people in the following industries world wide:</h3>

<script type="text/javascript" language="JavaScript1.2"><!--
	document.write(RenderList(2));
	// --></script>

<h3>ICS has worked with companies in the following countries:</h3>

<script type="text/javascript" language="JavaScript1.2"><!--
	document.write(RenderList(3));
	// --></script>

<h3>Contact ICS</h3>

Feel free to contact us!<br />
<br />
<script type="text/javascript" language="JavaScript1.2"><!--
	document.write(RenderContactInfo());
	// --></script> 
 <br />


<div class="whs1">

<hr class="whs2" />


Site URL: <script type="text/javascript" language="JavaScript1.2">document.write(RenderSiteUrl());</script> 
 
</div>

<div>&nbsp;
</div>
<div class="whs3">This Help system was created us<font style=" color:'red'; font-size:12pt;font-family:'arial';">ing a trial version of RoboHelp. Files generated with the trial version are intended for evaluation purposes only and may not be used or distributed for any other purpose</font><font style=" font-size:12pt;font-family:'arial'; color:'red';">.</font>
</div>
<div>&nbsp;
</div>
<p>&nbsp;</p>
<script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
	writeIntopicBar(0);
//-->
</script>
<form method="POST" action="http://www.helpcommunity.com/ehelpapi.asp?cmd=WebSave" name="ehelpform" target="_top" style="display:'none';">
<input type="hidden" name="data" value="2A0D023200000057656C636F6D6520746F20496E7465726E6174696F6E616C205374616666696E6720436F6D70616E79205765622048656C7011020000000012023200000057656C636F6D6520746F20496E7465726E6174696F6E616C205374616666696E6720436F6D70616E79205765622048656C70130238000000496E7465726E6174696F6E616C205374616666696E6720436F6D70616E792044796E616D6963204461746120666F7220526F626F48656C7015023C000000496E7465726E6174696F6E616C5F5374616666696E675F436F6D70616E795F44796E616D69635F446174615F666F725F526F626F48656C702E68746D1703740100003C3F786D6C2076657273696F6E3D22312E30223F3E0D0A3C21444F43545950452053595354454D20226568656C706F70742E647464223E0D0A3C46494C452D4F5054494F4E532046494C452D56455253494F4E3D2232222046494C452D4B45593D2230346166316636625F633638335F343135655F626263655F626232326231323335376531223E0D0A3C2F46494C452D4F5054494F4E533E0D0A3C4548454C502D4F5054494F4E5320464F524D41542D56455253494F4E3D22312E30223E0D0A203C4F5054494F4E5320454E41424C45443D225945532220454D4245444445443D2259455322204D41494E2D57494E444F572D4F4E4C593D224E4F2220434F4D4D554E4954592D4E4F544946593D224E4F222046495253542D504147453D224E4F542D534554223E0D0A203C2F4F5054494F4E533E0D0A203C425554544F4E2D4C4142454C3E5765625365617263680D0A203C2F425554544F4E2D4C4142454C3E0D0A3C2F4548454C502D4F5054494F4E533E18010400000002000000702A">
</form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions