Appendix J Introduction to HyperText Markup Language (Make my own web site) 4:
Friday, January 11th, 2008Appendix J Introduction to HyperText Markup Language 4: Part 2 1409 the textarea should be. This textarea is four rows of characters tall and 36 characters wide. Any default text that you want to place inside the textarea should be contained in the textareaelement. The input type = “password” (line 44) inserts a text box with the indicated size. The password input field provides a way for users to enter information that the user would not want others to be able to read on the screen. In visual browsers, the data the user types into a password input field is shown as asterisks. However, the actual value the user enters is sent to the server. Nonvisual browsers may render this type of input field differently. Lines 50 68 introduce another type of form element, the checkbox. Every inputelement with type =”checkbox” creates a new checkbox item in the form. Checkboxes can be used individually or in groups. Each checkbox in a group should have the same name(in this case, name=”thingsliked”). This notifies the script handling the form that all of the checkboxes are related to one another. Common Programming Error J.5 When your form has several checkboxes with the same name, you must make sure that they have different values, or else the script will have no way of distinguishing between them. Additional form elements are introduced in Fig. J.5. In this form example, we introduce two new types of input options. The first of these is the radio button, introduced in lines 80 97. Inserted into forms with the inputattribute type = “radio”, radio buttons are similar in function and usage to checkboxes. Radio buttons are different in that only one element in the group may be selected at any time. All of the nameattributes of a group of radio inputs must be the same and all of the valueattributes different. Insert the attribute checked to indicate which radio button you would like selected initially. The checked attribute can also be applied to checkboxes. Common Programming Error J.6 When you are using a group of radio inputs in a form, forgetting to set the namevalues to the same name will let the user select all the radio buttons at the same time an undesired result. 1 3 4 5 6 7 8
9 10 11 12 13 14Feedback Form
15 Fig. J.5 Fig. J.Fig..Fi J5g. J.5J.5Form including radio buttons and pulldown lists. (Part 1 of 4.) Fig.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.