Control by html description, Image display, Cgi function for image display – Panasonic WJ-NT104 User Manual

Page 73: Html sample file [mainview1.html

Advertising
background image

73

Description

To get a frame of a new image.
Parameter CH:

Fixed Input, Random Input mode:
Ignored (or can be omitted)
Multi Input mode: Essential

Push mode image get command for Netscape
Parameter CH:

Fixed Input, Random Input mode: Ignored (or
can be omitted)
Multi Input mode: Essential

Channel for converting %c: Essential

Name of files to be converted: Essential

Parameter

1-4

1-4

1-4

File name

Parameter name

CH

CH

CH

FILE

URL

/cgi-bin/camera

/cgi-bin/push

/cgi-bin/chconv

CGI item

Pull mode
image get

Push mode

image get

Channel No.

conversion

(See page 79.)

CONTROL BY HTML DESCRIPTION

Image display, camera operation, and alarm image display can be effected on the WWW browser by means of commands
described in the HTML (Hyper Text Mark-up Language) file. The WJ-NT104 employs CGI (Common Gateway Interface) to
carry out these functions. When using a function, the following syntax is used.

Syntax: http://<IP address >/<CGI function>?<Parameter>=<value> [&<Parameter> = <value>...]

Image Display

CGI function for image display

<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR=”#FFFFCC”>
<CENTER>
<SCRIPT LANGUAGE=”JavaScript”>
var myDate = new Date();
var tmpImg = new Image(%W,%H);
width=%W
height=%H
function drawcamera() {

document.CamImg.src=this.src;

}
function loadcamera() {

myDate = new Date();
tmpImg.src = “/cgi-bin/camera?CH=%c&PAGE=”+ myDate.getTime();
tmpImg.onload = drawcamera;
tmpImg.onerror= drawcamera;

}

document.write(“<IMG SRC=/cgi-bin/camera?CH=%c&PAGE=”+myDate.getTime()+” NAME=CamImg
onLoad=\”TimerID=setTimeout(‘loadcamera()’,%i);\” onError=\”TimerID=setTimeout(‘loadcamera()’,%i);\”
WIDTH=”+width+” HEIGHT=”+height+ “ VSPACE=5></A>”);

</SCRIPT>
</CENTER>
</BODY>
</HTML>

z

HTML Sample File [mainview1.html]

z This is a function to call new images by means of JavaScript.

x This is a time interval (msec) to be converted by %i, requesting a new image in pull mode (see page 79). The page num-

ber of the argument is added for nullifying the cache.

x

Advertising