JAVA Tech VERSION 3.0 manual Method getVersion

Models: VERSION 3.0

1 88
Download 88 pages 5.41 Kb
Page 18
Image 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

}

Method: getVersion()

E.g. var version = ViewONE.getVersion();

Returns a String value representing the product version.

18

Page 18
Image 18
JAVA Tech VERSION 3.0 manual Method getVersion