
Come si può vedere, la seconda riga della tabella <TR> ha un tag
<TD> per visualizzare il baudrate RS232 attuale con il “Tag di
visualizzazione” <%Baudrate232%>.
Il testo in grassetto che segue evidenzia la parte del codice HTML che
corrisponde al List-Menu.
L’elemento “size” imposta il numero di voci visualizzate allo stesso
momento.
Gli elementi <
option
> definiscono le possibili scelte che appaiono sul
menù.
La presenza dell’attributo “selected” nell’elemento <option> significa
che questa voce viene selezionata per default. Se non viene
selezionato nessun valore, di solito il campo rimane indefinito.
Si noti come la stringa “value” abbia la stessa struttura della stringa
“name” nei Text Box e sia composta da due campi: un “campo header”
(?script:) e un “campo comando”.
Il campo header “?script:“ viene usato per segnalare al WebGate che
l’utente sta scrivendo il parametro.
As you can see, the second table row <TR> has a <TD> tag to display
the current RS232 baudrate by the “Visualization tag”
<%Baudrate232%>.
The successive boldface text highlights part of the List-Menu HTML
language.
The size element sets the number of items showing at once.
The <
option
> elements specify the actual choices on the menu.
An occurrence of the attribute “selected” in the <option> element sets
the form control to select this item by default. If no value is selected,
typically the field remains undefined.
Note that the value string has the same structure of the name string for
Text Boxes and it is composed by two fields: an “header field” (?script:)
and a “command field”.
The header field “?script:“ is used to signal to WebGate that the user is
writing the parameter, when it parses the submitted data.
30
Manuale WebGate - cod. +030220230 rel. 1.0 - 16.09.2003
Esempio di utilizzo di list-menu in un form /
Example of using list-menu 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">
<form name="form1" method="get" action="RS232.htm">
<table width="517" 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">RS232 Setup</font></b></font></td>
</tr>
<tr>
<td width="142" align="right" height="12" bgcolor="#e8e8e8">
<font face="Verdana, Arial, Helvetica, sans-serif">
<b><font size="2">Current Baudrate:</font></b></font></td>
<td width="58" height="12" align="left" bgcolor="#e8e8e8">
<font face="Verdana, Arial, Helvetica, sans-serif">
<b><font face="Verdana, Arial, Helvetica, sans-serif">
<b><font size="2" color="#0000CC"><
%Baudrate232%
></font>
<font size="2"> </font></b></font></b></font></td>
<td width="96" height="12" align="right" bgcolor="#d7d7d7">
<font face="Verdana, Arial, Helvetica, sans-serif">
<b><font size="2">Change to...</font></b></font></td>
<
td width="116" height="12" valign="middle" bgcolor="#d7d7d7" align="left"
>
<
font face="Verdana, Arial, Helvetica, sans-serif"
>
<
b><font size="2"
>
<
select name="select2" size="1"
>
<
option value="?script:baudrate232=1200" selected>1200</option
>
<
option value="?script:baudrate232=2400">2400</option
>
<
option value="?script:baudrate232=4800">4800</option
>
<
option value="?script:baudrate232=9600">9600</option
>
<
option value="?script:baudrate232=19200">19200</option
>
<
option value="?script:baudrate232=38400">38400</option
>
<
option value="?script:baudrate232=115200">115200</option
>
<
/select
>
baud</font></b></font></td>
<td width="95" height="12" valign="top" bgcolor="#d7d7d7" align="center">
<input type="submit" name="Button" value="Confirm">
</td>
</tr>
<tr>
<td colspan="5" align="center" height="34"></td>
</tr>
</table></form></body></HTML>