DIRECTORY
Main Menu
Affiliate Programs
Hosting
Traffic
Content
BillinG
Design
show pic archive
Articles
Tutorials
interviews
jbm newsletteRS
jbm JOBS BOARD
Contact Us
Message Board

Advertising inquiries


 
 
Tutorials - Creating FORM RADIO BUTTONS

The Radio Button
This is a neat little deal that places a circle on the page. That circle is active and a reader can use the mouse to click on it. When the radio button is chosen, it darkens. Here are three radio buttons:

- -

Go ahead. Click on them. I have three of them there to prove a point. The point is that radio buttons are a one choice deal only. When you use radio buttons, only one can be checked. When another is checked, the first one gives up its selection. Go ahead -- try it.

Why are they called radio buttons? The reason is that they act as the radio buttons used in older car radios. When you pushed one, the dial moved. When you pushed another, the first choice was dropped and the dial moved again. You're probably too young to remember. It was back when AM only was a big selling radio.

Here's the command to place a radio button on your page.

<INPUT TYPE="radio" NAME="heading of button" VALUE="button name">

You see, the TYPE in the command is "radio." The command is long, but it's not that difficult to understand. Here are its four parts and what they mean:

* INPUT: This tells the computer "Here's a form item to deal with!"
* TYPE: This tells the computer what type of form item it will be. In this case, it's a radio button.
* NAME: This names the category the button is in on your form page. Let's say you have six different choices under one heading. Like six ice cream flavors all under the heading, "Favorite Ice Cream." "Ice Cream" would be the category. It's the heading of the group of radio buttons.
* VALUE is the name assigned to the button. Like in the ice cream example above, you have six buttons each labeled with six different flavors. Well, you would give one the value of vanilla, one chocolate, etc., etc.

Why on earth would I want to label all those?

Remember that this is going to be sent to you through the mail. You will have to be able to read what the person chose. Say you have a guestbook with a section of radio buttons that ask which page the user is signing in from. Your "NAME" in the command might be "signing_in_from." Then each of the radio buttons is assigned the "VALUE" of each of your pages. Let's say a person chooses the radio button assigned to your home page. That button's VALUE might be, "home_page."

Thus, when the form arrived to you, the e-mail would read:

"signing_in_from_ home_page"

 

 

 

 

 

with help from htmlgoodies

Please pass on any suggestions or comments to Shok.