![]() | ![]() |
Create a control for a form. A control is an element which the user can use to enter data, like textboxes, radiobuttons and checkboxes. This tag is only valid inside the FORM tag. |
![]() | |||||||||||||||||||||||
ACTION![]() |
Use the action attribute to specify the action used when the viewer selects the
control. This action overrides the action set in the
FORM tag and also immediately sends the value for the
control to the server without the values for the rest of the form.
The default value for a control is 0. Use the value attribute for the control to set a different value. When both the action and submitform attributes are set for the control, the WebTV interface submits the entire form by means of this action. Note that the action attribute can also be used to invoke client functions. However, client functions are not recommended for content developers. These functions are intended for use by WebTV Networks for developing basic WebTV functionality. | ||||||||||||||||||||||
ACCEPT![]() |
This attribute is used with TYPE=FILE to restrict the kinds of files allowed to attach to those matching a comma separated list of MIME content types given with the ACCEPT attribute e.g. ACCEPT=image/* restricts files to images. | ||||||||||||||||||||||
ALIGN![]() ![]() |
This attribute can be used with TYPE=IMAGE to specify how the image must be
aligned. The possible values are the same as the values of the
IMG tag.
| ||||||||||||||||||||||
CHECKED![]() ![]() ![]() |
This attribute is used with an input TYPE=RADIO or TYPE=CHECKBOX to indicate the specific control is checked when the page is opened. | ||||||||||||||||||||||
MAXLENGTH![]() ![]() ![]() |
This attribute is used with an input TYPE=TEXTor TYPE=PASSWORD to set the maximum number of characters the user can enter in the entry-field. | ||||||||||||||||||||||
NAME![]() ![]() ![]() |
Specifies the name of the control. This name will be returned to the processing
program on the server.
For controls with TYPE=RADIO this attribute is used to group radio-buttons together. This is done be giving them the same name. The result is that the user can only select one of the radio-buttons in the group. | ||||||||||||||||||||||
NOARGS![]() |
Use the noargs attribute with the action attribute to prevent arguments from being submitted with the action for the control. | ||||||||||||||||||||||
NOHIGHLIGHT![]() |
Use the nohighlight attribute to prevent the yellow Highlight rectangle from
drawing when the viewer selects the control.
You can use the nohighlight attribute on text entry fields. Since the text entry field, defined by , draws a cursor to indicate that the viewer can type there, it’s not necessary to also indicate the selected field with a yellow Highlight rectangle. The nohighlight attribute can be used to disable the yellow Highlight rectangle in this case. You can also use the nohighlight attribute if there is only one area on a page that can be selected. In this case, make the selectable area obvious to the viewer with graphics, text, formatting, or sound, since the nohighlight attribute disables the Highlight rectangle. | ||||||||||||||||||||||
ONBLUR
|
Specifies JavaScript code to execute when a text element loses focus. This attribute is valid for TYPE=FILE, PASSWORD, and TEXT. | ||||||||||||||||||||||
ONCHANGE
|
Specifies JavaScript code to execute when a text element loses focus and its value has been modified. This attribute is valid for TYPE=FILE, PASSWORD and TEXT. | ||||||||||||||||||||||
ONCLICK![]() ![]() |
JavaScript statement that will be executed when the user clicks on the item. This attribute is valid for TYPE=BUTTON, CHECKBOX, RADIO, RESET and SUBMIT. | ||||||||||||||||||||||
ONFOCUS
|
Specifies JavaScript code to execute when an element gets focus. This attribute is valid for TYPE=FILE, PASSWORD and TEXT. | ||||||||||||||||||||||
SUBMITFORM![]() |
In version 1.1 of the WebTV HTML interface, use the submitform attribute to
submit all form data when the viewer changes the value of a particular control
in the form.
When the action attribute is set for a control, the value for the control is sent to the server immediately. If the submitform attribute is not set, only the value for the selected control is submitted. When both the action and submitform attributes are set for the control, the WebTV interface submits the values for the entire form using the action for the control. | ||||||||||||||||||||||
SIZE![]() ![]() ![]() |
This attributes determines the number of characters the control is wide. Note that this attribute doesn't set the number of allowed characters, you need the MAXLENGTH to set this. The default is 20 characters. | ||||||||||||||||||||||
SRC![]() ![]() ![]() |
Allowed with TYPE=IMAGE, this attribute specifies the url of the image. | ||||||||||||||||||||||
TYPE![]() ![]() ![]() ![]() |
The default type is TEXT. | ||||||||||||||||||||||
VALUE![]() ![]() ![]() |
Depending on the TYPE, the value is used in different ways :
| ||||||||||||||||||||||
WIDTH![]() |
Use the width attribute to set the width of the control in pixels. By default, the width fits the text content of the input. If the control displays text, the WebTV interface truncates the text and follows it with an ellipsis if the text can't fit within the width. |
![]() | ![]() |
Source: | <FORM> Enter your name <INPUT TYPE=TEXT SIZE=20 MAXLENGTH=30> </FORM> |
Result: | |
Source: | <FORM> Select your favorite color <SELECT> <OPTION>Red <OPTION>Orange <OPTION>Yellow <OPTION>Green <OPTION>Purple <OPTION>Blue </SELECT> <INPUT TYPE=BUTTON NAME=ColorButton VALUE=" Push here " ONCLICK="ColorButton.value='You pushed me'"> </FORM> |
Result: | |
Source: | <FORM><TABLE BGCOLOR=#D0D0D0 BORDER=2><TR><TD><TABLE> <TR><TD>Show toolbar as</TD> <TD><INPUT TYPE=RADIO NAME=toolbar> Pictures</TD> <TD><INPUT TYPE=RADIO NAME=toolbar CHECKED> Text</TD> <TD><INPUT TYPE=RADIO NAME=toolbar> Pictures and Text</TD> </TR> <TR><TD COLSPAN=4><HR></TD></TR> <TR><TD>On startup launch</TD> <TD><INPUT TYPE=CHECKBOX NAME=launch CHECKED> Browser</TD></TR> <TR><TD></TD><TD><INPUT TYPE=CHECKBOX NAME=launch CHECKED> Mail</TD></TR> <TR><TD></TD><TD><INPUT TYPE=CHECKBOX NAME=launch> Newsreader</TD></TR> </TR></TABLE></TD></TR></TABLE> </FORM> |
Result: |