Pages: 1
Print
Author Topic: WebHelp -- How Does Left Panel Get Loaded  (Read 2237 times)
EvetsM
Member

Posts: 3


« on: May 13, 2014, 12:20:18 PM »

Product: XMetaL Author Enterprise Version#: 9.0.0.047
Windows 7

I've looked at the page source for a sample WebHelp system and the left panel (Contents, Index, Search) are not in it.

Apparently it is loaded programatically. Can anyone point me to the script and line(s) where the loading takes place?

Thanks!
Steve
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: May 13, 2014, 04:24:03 PM »

The following code should be in the main HTML file that is generated, with the files being copied to those relative path locations:

Code:
<script src="xmwebhelp/script/toc_data.js" type="text/javascript"></script>
<script src="xmwebhelp/script/index_data.js" type="text/javascript"></script>
<script src="xmwebhelp/script/search_data.js" type="text/javascript"></script>
<script src="xmwebhelp/script/common_param.js" type="text/javascript"></script>
<script type="text/JavaScript">document.write("<title>"+gMapTitle+ "</title>");</script>

<script src="xmwebhelp/script/jquery-1.3.2.js" type="text/javascript"></script>
<script src="xmwebhelp/script/jquery.treeview.js" type="text/javascript"></script>
<script src="xmwebhelp/script/webhelp.js" type="text/javascript"></script>
Logged
EvetsM
Member

Posts: 3


« Reply #2 on: May 15, 2014, 02:57:18 PM »

Thanks, Derek.

In case anyone else wondered about this, I perused some of the JavaScript files and set some breakpoints in developer tools, then loaded a WebHelp page.

The left panel (ToC) seems to be built starting in webhelp.js. That file has a document.ready event that calls whBuildToC.

Steve
Logged
Pages: 1
Print
Jump to: