|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Forms In HTML Continued Pull Down and Scrolling Lists
The next type of input is a Pull Down List. With this type you use <SELECT> instead of <INPUT> and it has a closing tag. <SELECT>
Don't forget to give it a name. <SELECT NAME="POSITION">
Next add a few options. <SELECT NAME="POSITION">
And give each <OPTION> a VALUE. <SELECT NAME="POSITION">
The default option is the one that is listed first. We can specify a default other than the first option in the list. <SELECT NAME="POSITION">
A Scrolling List is very similar in construction to a Pull Down List. We'll add a few more options first. Then, all we do to turn it into a Scrolling List is add a SIZE attribute to the <SELECT> tag. <SELECT NAME="POSITION" SIZE=4>
The SIZE is simply how many options show in the window. Again, the default value is the first <OPTION>, and again we can change that by selecting one. <SELECT NAME="POSITION" SIZE=4>
Textarea <TEXTAREA NAME="COMMENTS">
You control the size of the box like so... <TEXTAREA NAME="COMMENTS" ROWS=6 COLS=50>
ROWS is the height, COLS is the width.
A good attribute to include in <TEXTAREA> is WRAP. Some browsers do not understand it, but if that's the case, they will just ignore it. Go ahead and type in the boxes... <TEXTAREA NAME="COMMENTS" ROWS=3 COLS=30 WRAP=VIRTUAL>
WRAP=VIRTUAL means that the text in the box wraps, but it is sent as one long continuous string. <TEXTAREA NAME="COMMENTS" ROWS=3 COLS=30 WRAP=PHYSICAL>
WRAP=PHYSICAL means that the text in the box wraps, and it is sent that way too. <TEXTAREA NAME="COMMENTS" ROWS=3 COLS=30 WRAP=OFF>
This is the default.
Your own HTML page Open the page "feedback.htm" in Notepad, and add the following (the blue text is what to add). <html> <body realsrc="bgnd.gif" background="http://www.zeronese.net/knowledge-base/admin/bgnd.gif"> <center><h1>Feedback Form</h1></center> <br> <form> <b>My name is: </b><input type=text name="name"> <p> <b>I work as a:</b><br> . . </p> <p> <b>When it comes to web browsers:</b><br> . . </p> <b>I rate your site as:</b><br> <select name="Rating"> <option value="Wow">Wow! How did you do it? <option value="good">Really good <option value="interesting">Interesting <option value="hmmm">Hmmm - seen better <option value="tryagain">Try again bud! </select> </p> <p> <b>Comments:</b><br> <textarea name="comments" rows="6" cols="50" wrap="physical"> </textarea> </p> </body> </html> Save the file and test. Comments, Questions & Reviews
Comments is currently disabled for this article! Related Articles and Readings
The information provided in this article is for general information and/or the comments is the sole responsibility of their respective authors and does not necessarily reflect the opinion of zeronese.net does not endorse any article and/or comments published by our web users unless otherwise noted. |
Categories
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

