REDIRECTION
Place the following in the head section of a page:
<META HTTP-EQUIV="REFRESH" content="x; url=y">
Where x is the number of seconds before switching the page to y.
Uses
- when url of page has moved
- in a slideshow, where image(s) displayed change after specific time
- forced logout due to inactivity in a session
FORMS
References: http://www.w3.org/TR/html401/interact/forms.html#h-17.1
An HTML form is a section of a document containing normal content, markup, special elements called controls (checkboxes, radio buttons, menus, etc.), and labels on those controls. Users generally "complete" a form by modifying its controls (entering text, selecting menu items, etc.), before submitting the form to an agent for processing (e.g., to a Web server, to a mail server, etc.)
Example:
<FORM action="http://somesite.com/prog/adduser" method="post">
<P>
<LABEL for="firstname">First name: </LABEL>
<INPUT type="text" id="firstname"><BR>
<LABEL for="lastname">Last name: </LABEL>
<INPUT type="text" id="lastname"><BR>
<LABEL for="email">email: </LABEL>
<INPUT type="text" id="email"><BR>
<INPUT type="radio" name="sex" value="Male"> Male<BR>
<INPUT type="radio" name="sex" value="Female"> Female<BR>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</P>
</FORM>
HTML defines the following control types:
- buttons
- Authors may create three types of buttons:
Authors create buttons with the BUTTON element or the INPUT
element. Please consult the definitions of these elements for details about
specifying different button types.
Note. Authors should note that the BUTTON
element offers richer rendering capabilities than the INPUT
element.
-
checkboxes
- Checkboxes (and radio buttons) are on/off switches that may be toggled by
the user. A switch is "on" when the control element's checked
attribute is set. When a form is submitted, only "on" checkbox controls can
become successful.
Several checkboxes in a form may share the same
control name. Thus, for example, checkboxes allow users to select several
values for the same property. The INPUT element is used to create a
checkbox control.
- radio
buttons
- Radio buttons are like checkboxes except that when several share the same
control name, they are mutually exclusive: when one
is switched "on", all others with the same name are switched "off". The
INPUT element is used to create a radio button control.
- If no radio button in a set sharing the same control name is initially
"on", user agent behavior for choosing which control is initially "on" is
undefined. Note. Since existing implementations handle this
case differently, the current specification differs from RFC 1866 ([RFC1866] section 8.1.2.4), which states:
At all times, exactly one of the radio buttons in a set is checked.
If none of the <INPUT> elements of a set of radio buttons specifies
`CHECKED', then the user agent must check the first radio button of the set
initially.
Since user agent behavior differs, authors should ensure that in each set of
radio buttons that one is initially "on".
-
menus
- Menus offer users options from which to choose. The SELECT
element creates a menu, in combination with the
OPTGROUP and OPTION elements.
-
text input
- Authors may create two types of controls that allow users to input text.
The
INPUT element creates a single-line input control and the
TEXTAREA element creates a multi-line input control. In both cases,
the input text becomes the control's current
value.
-
file select
- This control type allows the user to select files so that their contents
may be submitted with a form. The INPUT element is used to create a file
select control.
-
hidden controls
- Authors may create controls that are not rendered but whose values are
submitted with a form. Authors generally use this control type to store
information between client/server exchanges that would otherwise be lost due to
the stateless nature of HTTP (see [RFC2616]). The INPUT
element is used to create a hidden control.
- object controls
- Authors may insert generic objects in forms such that associated values are
submitted along with other controls. Authors create object controls with the
OBJECT element.
The elements used to create controls generally appear inside a FORM
element, but may also appear outside of a FORM element declaration when they are
used to build user interfaces. This is discussed in the section on intrinsic events. Note that controls outside a form
cannot be successful controls.
|