Error Messages

There are a number of situations in which Joust will display an error message. Each of these messages is stored in a global variable in index.htm, allowing you to change the text of the message to suit your needs (translating to a different language, for example).

To change the text of an error message, simply add a line to your initialise function assigning the new message text to the appropriate variable, as described below.

Security Restrictions

When a user switches between Floating and Frames modes, Joust remembers what page is currently loaded in the 'text' frame and reloads that page (if savePage is set to true). If the currently loaded page is from a different server this will break the JavaScript security model. Joust will detect this situation and display the following message:

Due to security restrictions imposed by your browser, I cannot change modes while a page from another server is being displayed. The default home page for this site will be displayed instead.

You can change this message, if you wish, by adding a line like the following to your initialise function:

smSecurityMsg = "My custom security message";

Cookies Not Enabled

In order to change modes, Joust needs to be able to store a cookie in the users browser. The setMode function will test if it is allowed to set a cookie and, if not, it will display the following error:

You must have Cookies enabled to change the display mode!

You can change this message, if you wish, by adding a line like the following to your initialise function:

smCookieMsg = "My custom cookie message";

Floating Mode Not Supported

Floating mode does not work in all browsers (like Opera). If a user of one of these browsers tries to select floating mode, the following message will be displayed:

Sorry, your browser does not support this feature!

You can change this message, if you wish, by adding a line like the following to your initialise function:

smNoFloat = "My custom not supported message";

JavaScript Errors

Many browsers give incomplete or inaccurate information when a JavaScript error occurs. Hopefully, you will never get a JavaScript error but, if you do, Joust will attempt to collect some useful information and display a custom error message. It will look something like this:

A JavaScript error has occurred on this page! Please note down the following information and pass it on to the webmaster.

Error: Object does not support this property or method.
Page: http://www.mycompany.com/index.htm
Line: 305
Browser: Mozilla/4.0 (compatible; MSIE 5.0b2; Windows 95)

You can change the top part of this message, if you wish, by adding a line like the following to your initialise function:

var jsErrorMsg = "My custom JavaScript error";

Note that this custom error will not work all the time. There will be times (like before Joust has set up it's default error handler) when you may still get the browsers default error dialog.

The Joust Outliner