JAVA Tech JAVA Technologies Co. Ltd. Marine Radio VERSION 3.0 Manuel D’Utilisation

Page de 88
 
 
18
18
18
18
 
 
 
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
}
 
 
getVersion() 
 
E.g. var version = ViewONE.getVersion(); 
 
Returns a String value representing the product version. 
Method: