ITSE 1411 Beginning Web
JS Form Button Chapter 5 Discussion

Discussion
- Radio Buttons
- Click on radioButtonsExample.htm
- View the source.
- Save in your module4 folder in the public_html folder.
- Open radioButtonsExample.htm in Komodo Edit.
- Resize this page on the left of your screen.
- Resize the radioButtonsExample.htm page on the right of your screen.
- Explanation of the radio buttons on the radioButtonsExample.htm page
- When a web page has radio buttons, the intent is that only one button can be selected at a time. Usually, all radio buttons in a group have the same name. However, the difference is that each radio button has a different value.
- When a radio button is selected the checked attribute is set to true (checked).
- When no checked attribute is included, then the checked attribute defaults to false.
- When form elements share the same name, JavaScript creates an array of the elements with the same name.
- To access one of the radio buttons, you access it in the order that it is defined. For example the checked attribute of the second radio button with the value $40.95 uses:
- document.forms[0].delivery[1].checked
- Check Boxes
- Click on checkboxExample5thEd.htm
- View the source.
- Open checkboxExample5thEd.htm in Komodo Edit.
- Resize this page on the left of your screen.
- Resize the checkboxExample.htm page on the right of your screen.
- Explanation of the check boxes on the checkboxExample.htm page
- The intent of check boxes is to allow the user to select more than one choice.
- You can group check boxes by giving each the same name value. But, you can also give each a different name.
- The checked attribute for checkboxes is the same as the checked attribute for radio buttons.
- The form example on (JavaScript page 268) has action="FormProcessor.html". This means that when the form is submitted the data gathered in the form is sent to a page called FormProcessor.html. Follow the steps given using FormProcessor for this assignment. The way the FormProcessor.html page works will be explained in another assignment.
- The Subscription.html on (JavaScript pages 269) used a table. This was used for alignment. The form elements could have been inside paragraph or div tags.