Click here to Skip to main content
15,867,594 members
Articles / Web Development / HTML

Providing Web Applications with Context Sensitive Help Using RoboHelp WebHelp

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
23 Apr 2008CPOL11 min read 72.7K   1.5K   17  
This article shows how to implement context sensitive help for your ASP.NET web applications using RoboHelp WebHelp.
<html>
<head><script language="javascript">
<!--
var sIcon="whstart.ico";
var sPath=document.location.href;
if (sPath.indexOf("http")!= -1)
	document.write("<link REL=\"SHORTCUT ICON\" href=\""+ sIcon +"\">");
//-->
</script>
 <title>Webhelp Demo</title>
 <meta name="generator" content="RoboHelp by eHelp Corporation   www.ehelp.com">
 <meta name="description" content="WebHelp 5.50">
</head>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript" src="whutils.js"></script>
<script type="text/javascript" language="javascript" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" >
<!--
if (!window.gbWhVer||!window.gbWhUtil||!window.gbWhMsg)
	document.location.reload();
//-->
</script>

<script type="text/javascript" language="javascript" src="whstub.js"></script>
<script language="javascript">
<!--
var nWebhelpNavPaneMode = 1;			//1: DHTML 2:Applet 3:PureHTML 4:NoframeAt all
var strPaneDHTML  = "whskin_pdhtml.htm";		//whd_nvp10.htm  if tab enabled, whnframe.htm if tab disabled.
var strPaneApplet = "whskin_papplet.htm";
var strPaneList   = "whskin_plist.htm";
var bNoApplet  = false;

var strPane = "";

var nViewFrameType = -1;

if (!window.gAgent)
{
	// low end browser, we don't even try to determine it.
	document.location = "whnjs.htm";
}
else
{
	if (!gbNav4&&!gbIE4&&!gbOpera7&&!gbSafari)				
		document.location = "whnjs.htm";
	else if (gbNav4 && !gbNav6 && ((gnVerMinor <= 4.06)))
		document.location = "whnjs.htm";
	else if (gbMac && gbIE4 && !gbIE5)		
		document.location = "whnjs.htm";
	//figure out which mode is the best
	else
	{
		nViewFrameType=nWebhelpNavPaneMode;
		if (nWebhelpNavPaneMode==1||nWebhelpNavPaneMode == 2)
		{
			var gbDHTML=(nWebhelpNavPaneMode==1);
			if (gbNav4) 										nViewFrameType = 2;
			if (gbNav4&&(gnVerMinor < 4.1))						nViewFrameType = 3;
			if (gbNav4&&(gnVerMinor == 4.6))					nViewFrameType = 3;
			if (gbIE4&&gbDHTML)									nViewFrameType = 1;
			if (gbIE4&&gbSunOS&&nWebhelpNavPaneMode==2)			nViewFrameType = 3;
			if (gbNav4&&gbSunOS&&nViewFrameType==2)			nViewFrameType = 3;
			if (gbNav6&&gbDHTML)								nViewFrameType = 1;
			if (gbNav6&&!gbNav61&&nWebhelpNavPaneMode == 2)		nViewFrameType = 3;
			if (gbMac)											nViewFrameType = 3;
			if (gbOpera7&&nViewFrameType == 2)					nViewFrameType = 3;
			if ((bNoApplet)&&(nViewFrameType == 2)) 			nViewFrameType = 3;
		}
	}
}

if (nViewFrameType!=-1)
{
	var gbWindows = ((gAgent.indexOf("win") != -1) || (gAgent.indexOf("16bit") != -1));
	//The colordepth of the 16 color on Windows is 1. 
	if ((gbWindows) && (gbNav4) && (window.screen) && (window.screen.colorDepth <= 4))
	{
	   alert("WebHelp has detected that your display is set to 16 colors. For full WebHelp support, please set your display to use 256 or more colors.");
	   nViewFrameType = 3;
	}

	//figure out which one is navpane
	// ReplaceMark:nViewFrameType = 1
	if (nViewFrameType == 1)
	{
		if (gbNav4 && !gbNav6)
			strPane = strPaneList;
		else
			strPane = strPaneDHTML;
	}
	else if (nViewFrameType == 2)
		strPane = strPaneApplet;
	else
		strPane = strPaneList;
}
//-->
</script>
<script type="text/javascript" language="javascript" src="whstart.js"></script>
<script type="text/javascript" language="javascript">
<!--
if (!gbIE4&&!gbNav4&&!gbOpera7&&!gbSafari)
	document.location = "whnjs.htm";

function CMRAgent( strID, strURL, strLabel, strFrameAttr )
{
  this.m_strID = strID;
  this.m_strURL = strURL;
  this.m_strLabel = strLabel;
  this.m_strFrameAttr = strFrameAttr;
}

function CMRServer()
{
  this.m_cAgents = new Array;
}
var cMRServer = new CMRServer;
// GetServerInfo
// Registry the agent array handled by webhelp
// ReplaceMark:MRServer.strServerData
//-->
</script>

<script type="text/javascript" language="javascript">
<!--
if (nViewFrameType!=-1)
{
	var strHTML = "<frameset rows=\"32,*\" hostof=\"parent:toolbar!startpage:yes\" frameborder=\"0\" border=\"0\"><frame src=\"whskin_tbars.htm\" id=\"toolbar\" frameborder=\"0\" border=\"0\" scrolling=\"no\" noresize marginheight=\"0\" marginwidth=\"0\" title=\"Toolbar\"></frame><frame src=\"whskin_frmset01.htm\"  frameborder=\"1\" border=\"1\" scrolling=\"auto\" marginheight=\"0\" marginwidth=\"0\"></frame></frameset>";
	document.write(strHTML);
}
//-->
</script>

<frameset cols="100%,*" frameborder=no border=0>
  <frame src="whnjs.htm">
  <frame src="whskin_blank.htm" noresize>
</frameset>

</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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
President Starpoint Software Inc.
United States United States
Bob Pittenger is founder and President of Starpoint Software Inc. He holds a B.A. degree from Miami University, M.S. and Ph.D. degrees from Purdue University, and an MBA from Xavier University. He has been programming since 1993, starting with Windows application development in C++/MFC and moving to C# and .NET around 2005 and is a .NET Microsoft Certified Professional Developer.

Bob is the author of two books:
Billionaire: How the Ultra-Rich Built Their Fortunes Through Good and Evil and What You Can Learn from Them
and
Wealthonomics: The Most Important Economic and Financial Concepts that Can Make You Rich Fast.
Visit http://www.billionairebook.net for more information.

Comments and Discussions