Launching ToolBook HTML Applications from CD-ROM


I just ran across this situation so I thought I would share it with everyone. I have a client that wants to be able to run the ToolBook Applications from CD-ROM but wants the application to run in the Browser.  Thus it could be run if the user is not connected to the Internet.  No problem on the ToolBook side at all since we actually have the ability to create an autorun.inf file.  But the client wants a standard HTML Launch Page that can easily be modified, etc. in FrontPage.  The desire also is to be able to click on a link to launch a lesson and have that application popup in its own window.  JavaScript is one acceptable solution for this.


<html>
<head>
<title>Course Launch Page</title>

<SCRIPT LANGUAGE="JavaScript">

function popupPage1() {
var page = "../module1/index.html";
windowprops = "height=480,width=640,location=no,"
+ "scrollbars=no,menubars=no,toolbars=no,resizable=yes";

window.open(page, "Popup", windowprops);
}

function popupPage2() {
var page = "../module2/index.html";
windowprops = "height=480,width=640,location=no,"
+ "scrollbars=no,menubars=no,toolbars=no,resizable=yes";

window.open(page, "Popup", windowprops);
}

</script>
</head>

<p>Select a Lesson from the List Below.</p>

<p><a href="#" onClick="popupPage1()">Module 1</a></p>

<p><a href="#" onClick="popupPage2()">Module 2</a></p>


For each link that is needed, a new line is added at the bottom and a new function called.  Then a new function is created within the script section at the top. Note that the structure for this on the CD is this:

Root: autorun.inf which is set up to launch a menu.htm page in a menu folder

Then there are three folders at Root level: menu, module1, and module2.

Notice the value for the variable page as to how it is coded to go up one level, locate the lesson folder and then go into that folder and open the index.html page.  The rest of the JavaScript function causes the application to be opened in its own window at the size desired. The books are published to not use an Index page as the launch page since this is how we are launching the application.