W&T 57630 Manual page 68

Web-io series 12+12 digital
Table of Contents

Advertisement

W&T
In any case, setPassword can only be invoked once the Java
applet has been started, since otherwise runtime errors would
occur.
i
An example in which the password is passed on using an
input field can be found by opening the Web page
app.htm in the Web-IO.
Read functions
function inputChanged( iDevice, iNr, iVal )
{ Program code executed when there is a change on the inputs}
function outputChanged( iDevice, iNr, iVal )
{ Program code executed when there is a change on the outputs}
function counterChanged( iDevice, iNr, iVal )
{ Program code executed when there is a change in the counters}
The three functions above are invoked by the applet when there
is a change on the inputs or outputs or in the counters. iDevice
shows on which device a change has happened. iNr specifies
which input, output or counter has changed. The variable iVal
conveys the current state.
1
Please note that the names of the functions are
case-sensitive.
The following source code shows a short example for dynamic
display of Input 0.
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function inputChanged( iDevice, iNr, iVal )
{
if (iNr == 0 && iDevice==0)
{ document.getElementById( 'input' + iNr ).firstChild.nodeValue
= ( !iVal ) ? 'OFF' : 'ON';
}
else
{ iVal = 0;
}
}
68
Java Applets

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

57631

Table of Contents