12 Plug-in Reference
417
NeptuneLabs - FSI Viewer
Step 3. Add a JavaScript function to your HTML page receiving the event
notifications via FSCommand like in the example below.
IMPORTANT
The function name has to be exactly like in the example below and it has to start
with the ID/NAME parameter specified in step 2.
If you do not use the ID/NAME "fsiviewer" you have to replace the corresponding
script sections in the example below (printed bold) by your ID/NAME parameter.
Example: JavaScript Callback Function
<script language="javascript" type="text/javascript">
function fsiviewer_DoFSCommand(fsi_event, params) {
switch(fsi_event){
case "LoadProgress":
...
break;
}
}
// Hook for Internet Explorer
if (navigator.appName &&
navigator.appName.indexOf("Microsoft") != -1 &&
navigator.userAgent.indexOf("Windows") != -1 &&
navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('Sub fsiviewer_FSCommand
(ByVal fsi_event, ByVal params)\n');
document.write('
call fsiviewer_DoFSCommand(fsi_event,
params)\n');
document.write('end sub\n');
document.write('</SCRIPT\> \n');
}
</script>
After following the 3 steps described before you will receive the following event
notifications: