Navigating to a web page outside of my ToolBook DHTML lesson

Navigation ››


I need to navigate to a web page outside of my ToolBook generated lesson, using the same window.


If you are trying to create a hyperlink in ToolBook which will navigate your DHTML window to another web page which is not a part of your ToolBook book, you will find that a new window will always open in order to show that new URL. The DHTML window will refuse to let you navigate it away from the ToolBook set of pages.

This is intentional and by design - because to navigate away from the DHTML window will cause the DHTML environment that the book is running in, to forget all information collected during the DHTML session. This would include things like scoring information, LMS connectivity, Question State Data, Variables, etc.

However, if you understand the consequences, and you want to FORCE it to let you navigate the window to another URL, you can do so by using the following logic within the Actions Editor.

On click...

   Display URL: javascript:window.location='../new.html'

In this example the the NEW.HTML file represents the non ToolBook web page you want to navigate to. The ../ in the path tells the browser that this file is in the same directory as the INDEX.HTML file that represents the main ToolBook project launch file. Feel free to modify the pathing so that your file can be found at some relative address location.

You can also specify an explicit URL if you like such as:

On click...

   Display URL: javascript:window.location=''


This works not because of anything ToolBook has been designed to allow, but because the language of HTML supports specifying JavaScript within a URL.

Created with the Personal Edition of HelpNDoc: Easily create EBooks