3. Providing sample codes
3.1The sample codes for calling the ActiveX viewer
The ActiveX viewer is the program which can work in the environment of Internet Explorer (ver 5.5 sp2 or higher or ver 6) on Windows 98 / 98SE / NT4.0 / 2000 / Me / XP Operating System.This is named as the archive "SncRz30View.cab" and is located in /home/ directory in the
The sample codes are listed below and its brief introduction goes on as follows.
<!DOCTYPE HTML PUBLIC
<HEAD>
<META
<TITLE>ActiveX Viewer</TITLE>
<SCRIPT LANGUAGE="JavaScript1.2" SRC=”<IP>/command/inquiry.cgi?inqjs=sysinfo” TYPE="text/javascript"> </SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC=”<IP>/command/inquiry.cgi?inqjs=tcpip” TYPE="text/javascript">
</SCRIPT> | a) |
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> | The script for the |
inquiry of parameters | |
function AViewer(){ |
|
document.open(); |
|
document.write("<OBJECT ID='Camera1'"); |
|
document.write("CODEBASE='<IP>/home/SonySncRz30View.cab' NAME='viewer'>"); | |
document.write("<PARAM NAME='URL' "); |
|
document.write("VALUE="+Ip+">"); |
|
document.write("<PARAM NAME='MOUNT' "); |
|
document.write("VALUE="+Mount+">"); |
|
document.write("<PARAM NAME='RATE' "); | b) |
document.write("VALUE="+DefFrameRate+">"); | The function |
document.write("<\/OBJECT>"); | declaration |
document.close();
} |
| |
| ||
</SCRIPT> |
| |
</HEAD> |
| |
<BODY TEXT="#FFFFFF" BGCOLOR="#000000" ONLOAD="JavaScript:document.viewer.Start();"> | ||
<SCRIPT TYPE="text/javascript"> | c) | |
The scirpt for loading | ||
AViewer(); | ||
the ActiveX program | ||
| ||
</SCRIPT> |
| |
</BODY> |
| |
</HTML> |
|
The script for the inquiry of parameters
The ActiveX viewer the
"URL information"
This is information about the host name or IP address of the host for ActiveX to connect to. "Mount information"
This is information how the
"Default frame rate information"
This is information about the frame rate of the ActiveX viewer to get Motion JPEG images.