3 <title>Mesh Module Reference Manual</title>
5 <meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">
6 <meta name="description" content="WebHelp 5.50">
9 <script language="JavaScript">
12 var gArrayCsh = new Array();
14 var gstrWindowOption = "";
16 var gbWithNavPane = false;
18 function CshEntityItem(strAliasId, nTopicNum, strUrl)
20 this.strAliasId = strAliasId;
21 this.nTopicNum = nTopicNum;
26 //Try to get to topic number from hash string
27 function GetTopicNumberAuto(strMayBeNumber)
30 if (strMayBeNumber.length >= 1)
32 var strTmp = strMayBeNumber;
33 var iEnd = strTmp.length;
34 for (var i=0; i<iEnd; i++)
36 var ch = strTmp.charAt(i);
37 if (!((ch == "0") || (ch == "1") ||
38 (ch == "2") || (ch == "3") ||
39 (ch == "4") || (ch == "5") ||
40 (ch == "6") || (ch == "7") ||
41 (ch == "8") || (ch == "9")))
42 return GetTopicNumberById(strTmp);
44 nNum = parseInt(strTmp);
49 function GetTopicNumber(strHashString)
51 var nTopicEndPos = strHashString.indexOf(',')
52 if (nTopicEndPos == -1) { // no window option.
53 return GetTopicNumberOnly(strHashString);
56 var strWindowOption = strHashString.substring(nTopicEndPos + 1, strHashString.length);
57 var strWithNavPane = 'withnavpane=true';
58 if (strWindowOption.toLowerCase().indexOf(strWithNavPane) == 0)
60 if (strWindowOption.length > strWithNavPane.length)
61 gstrWindowOption = strWindowOption.substring(strWithNavPane.length + 1);
63 gstrWindowOption = "";
67 gstrWindowOption = strWindowOption;
68 return GetTopicNumberOnly(strHashString.substring(0, nTopicEndPos));
72 function GetTopicNumberOnly(strTopicString)
74 var nEqualPos = strTopicString.indexOf('=');
75 if (nEqualPos == -1) {
76 return GetTopicNumberAuto(strTopicString);
79 var strValue=strTopicString.substring(nEqualPos + 1, strTopicString.length);
80 if (strTopicString.toLowerCase().indexOf("topicnumber") == 0) {
81 return parseInt(strValue);
82 } else if (strTopicString.toLowerCase().indexOf("context") == 0) {
83 return GetTopicNumberById(strValue);
84 } else if (strTopicString.toLowerCase().indexOf("remoteurl") == 0) {
92 //Find HomePage of the WebHelp system
93 // we try to get the topic from remote project if it exists.
94 function RedirectToHomePage()
96 if (parent && parent != this && parent.goNext)
98 var sHome = parent.goNext();
104 function getHomePage()
106 if (parent && parent != this && parent.getRelHomePage)
108 return parent.getRelHomePage(document.location.href);
113 function addRemoteProject(strPath)
115 if (parent && parent != this && parent.addProject)
117 parent.addProject(strPath);
121 //Redirect page to...
122 function RedirectTo(strUrl)
124 if (gstrWindowOption.length != 0) {
125 var wnd = window.open(strUrl, "HelpStub", gstrWindowOption);
126 // close current window and rename the stub window to current window.
133 parent.document.location.href = strUrl;
138 //Prompt the user that we can not find...
139 function FailToFind(strMsg)
141 RedirectToHomePage();
144 //Find topic by topic number (defined in h file)
145 function FindTopicByTopicNum(nTopicNum)
148 var iEnd = gArrayCsh.length;
149 for (i=0; i<iEnd; i++)
151 if (gArrayCsh[i].nTopicNum == nTopicNum)
153 var strURL = gArrayCsh[i].strUrl;
156 var strHomePage = getHomePage();
157 if (strHomePage.length != 0)
158 strURL = strHomePage + strURL;
164 FailToFind("Fail to find topic assocaite with topic number: " + nTopicNum);
168 var oldPrefix = "HelpIdFromHTMLHelp_"
169 //Find topic by topic id (alias id defined in ali file)
170 function GetTopicNumberById(strTopicId)
172 if (strTopicId.indexOf(oldPrefix) == 0)
174 strTopicId = strTopicId.substring(oldPrefix.length);
178 var iEnd = gArrayCsh.length;
179 for (i=0; i<iEnd; i++)
181 if (gArrayCsh[i].strAliasId.toLowerCase() == strTopicId.toLowerCase())
183 return gArrayCsh[i].nTopicNum;
190 //Set Context-sensitive help entity...
191 function SetCsh(n, strAliasId, nTopicNum, strUrl)
193 gArrayCsh[n] = new CshEntityItem(strAliasId,nTopicNum,strUrl);
199 if (parent && parent != this)
200 return parent.location.hash;
206 <script language="javascript">
212 <script language="javascript">
214 //Find CSH according to hash string after this page
215 if (getHash().length > 0)
217 // VH 05/16/00 now support
221 // and WindowsOptions
222 // with the format #a=xxx,b=xxx,c=xxx...
223 var strHashString = getHash().toString();
224 // change ? to : for remote URL. because java applet have some problem to pass a URL with two : inside the URL so we changed it.
225 // so here need to change it back.
226 strHashString = strHashString.substring(1,strHashString.length);
227 strHashString = strHashString.replace("%072%057%057", "://");
228 var nTopicNum = GetTopicNumber(strHashString);
232 FindTopicByTopicNum(nTopicNum);
236 if (gstrURL.length > 0)
239 RedirectToHomePage();
244 RedirectToHomePage();
249 <p> Your browser does not support JavaScript. WebHelp Context-Sensitive Help requires JavaScript support to run.</p>