You are using a previous version of Active Jump.

Go To Current Version of This Page

Active Jump Logo


Information
The Basics
Text
Pictures
Spacing
Colors
Links
Alignment
Lists/Bullets
Tables
Frames
Multimedia
Forms
ISO Characters
Meta Tags
Contact Us


Email Support
Email Contact

Divider

Radio Button
Introduction
The radio button creates a circular button on your web page that can be selected by the user. Only one button in a group of radio buttons can be selected at one time.
Radio Button
The tag to put a radio button on your web site is <INPUT TYPE="RADIO" NAME="XXXX" VALUE="X">. XXXX is replaced with the name of the radio button. X is replaced with the value, which is what will be sent to the CGI script if that button is selected. Also, please note that the radio buttons must have the same name defined in NAME="XXXX" for only one button to be selected at once.

index.html - Notepad
....<BODY>

<FORM METHOD="POST" ACTION="script.cgi">

<INPUT TYPE="RADIO" NAME="btn1" VALUE="today">
<INPUT TYPE="RADIO" NAME="btn1" VALUE="tomarrow">

</FORM>

</BODY>....

My Homepage - Microsoft Internet Explorer

Automatically Selected
Automatically selecting a radio button means that a radio button is already selected when the user loads the page. To automatically select a radio button, add the line CHECKED to the <INPUT TYPE="RADIO" NAME="XXXX" VALUE="X"> tag so the final result looks like <INPUT TYPE="RADIO" NAME="XXXX" VALUE="X" CHECKED>.

index.html - Notepad
....<BODY>

<FORM METHOD="POST" ACTION="script.cgi">

<INPUT TYPE="RADIO" NAME="btn1" VALUE="today" CHECKED>
<INPUT TYPE="RADIO" NAME="btn1" VALUE="tomarrow">

</FORM>

</BODY>....

My Homepage - Microsoft Internet Explorer

Disable Radio Button
Disabling a radio button means that the radio button is grayed out and is unable to be edited by the user. To disable a radio button, add the line DISABLED to the <INPUT TYPE="RADIO" NAME="XXXX" VALUE="X"> tag so the final result looks like <INPUT TYPE="RADIO" NAME="XXXX" VALUE="X" DISABLED>.

index.html - Notepad
....<BODY>

<FORM METHOD="POST" ACTION="script.cgi">

<INPUT TYPE="RADIO" NAME="btn1" VALUE="today" DISABLED>
<INPUT TYPE="RADIO" NAME="btn1" VALUE="tomarrow">

</FORM>

</BODY>....

My Homepage - Microsoft Internet Explorer

Test Your HTML
Printer Friendly Version


Jonathan David VerLee
webmaster@activejump.com


White