
Ciascuna check box che aggiungete ad una form deve avere un nome
unico.
Per quanto riguarda il suo valore, vale la stessa regola delle text-box.
Poiché l’opzione check-box viene spesso utilizzata per impostare un
valore, il comando è normalmente un comando di scrittura. In questo
esempio sono “Baudrate232=19200” e “Baudrate485=19200”.
Naturalmente potete scegliere uno o
entrambi i comandi menzionati sopra, e
successivamente confermare cliccando il
pulsante Update o premendo Invio (
↵
).
Le due tag di visualizzazione alla fine
dell’esempio vi permettono di vedere le
impostazioni.
La figura precedente illustra il caso in cui
entrambe le opzioni sono state
selezionate, quando il primo baudrate era
1200 e il secondo 4800.
La figura che segue mostra il caso in cui
ACTION è impostato per
visualizzare i risultati sulla stessa
pagina.
Each checkbox you add to a form must have a unique name.
About its value, the rule is the same enounced for text-boxes.
Because the check-box option is normally used for choosing a value in
a range, the command generally is a writing command. In this example
it is “Baudrate232=19200” and “Baudrate485=19200”.
Of course you can choose one or both of the above mentioned
commands, than confirm clicking on the
Update button or typing enter (
↵
).
The two visualization tag at the end allow
you to see the settings.
The above figure shows the case of both
options selected, when the first baudrate
was 1200 and the second 4800.
The following figure displays the result, if
ACTION is set to the same page.
33
Manuale WebGate - cod. +030220230 rel. 1.0 - 16.09.2003
Esempio di utilizzo di check-box in un form /
Example of using check-boxes inside a form
<HTML>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/HTML; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="0" align="center">
<tr align="center"><td colspan="5" bgcolor="#FFCC33"><font face="Verdana, Arial, Helvetica, sans-serif">
<b><font size="2">Default Baudrates for RS232 and RS485</font></b></font></td>
</tr>
</table>
<
form name="form1" method="post" action="Checkboxes.htm"
>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#FDFBB3" bgcolor="#FDFBB3">
<tr><td>
<div align="center"><b><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#0066FF">
Default RS485 baudrate</font></b></div>
</td><td>
<div align="center"><b><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#0066FF">
Default RS232 baudrate</font></b></div>
</td></tr><tr><td>
<div align="center"><
input type="checkbox" name="RS485" value="?script:Baudrate485=19200"
>
</div>
</td><td>
<div align="center"><
input type="checkbox" name="RS232" value="?script:Baudrate232=19200"
>
</div>
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FDFBB3">
<tr>
<td>
<div align="center"><input type="submit" name="Submit" value="Update"></div>
</td>
</tr>
</table>
</form>
<p><b><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#0066FF">RS485
baudrate</font></b>
<
%baudrate485%
>
</p>
<p><b><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#0066FF">RS232
baudrate</font></b>
<
%baudrate232%
>
</p>
</body>
</HTML>
Fig. 7.3.2.6.2