var appletReady = false;
var doc = parent.frames.main.document; //(or just 'document' if it's not in a frame)
if (doc.ViewONE)
{
appletReady = doc.ViewONE.isReady();
}
if (appletReady)
{
//do something
}
The “if (doc.ViewONE)” line will result in false if the applet has yet to be started.
If you still have problems then you may want to make use of the “OnError” JavaScript statement that allows you to set up your own error handler. Your error handler will then be called when a JavaScript problem is encountered such as above. E.g..
onerror = errorHandler;
//you code to do whatever you need to do… then…
function errorHandler()
{
//if we get here it is probably because a call has been made //to the applet before the browser has had time to initialize it //it can therefore be ignored
}
Method: getVersion()
E.g. var version = ViewONE.getVersion();
Returns a String value representing the product version.
18