forms - 1 FORMS Forms For collecting user input An advanced...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 FORMS - Forms For collecting user input ° An advanced feature supported in newer versions of browsers. ° Users may design their forms anyway to their liking. Form input using <INPUT> ° Radio button for selecting one from a set in general: <input type=”radio” … checked> …<br> <input type=”radio” . ..> … <br> ° Checkbox for selecting more than one: <input type=”checkbox” …checked> … <br> <input type=”checkbox” . .. > … <br> ° Note: Using radio buttons to select more than one is allowed if so desired.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Form input using <SELECT> ° Will generate a pull-down menu to select one out of many. ° Need <option> to give values for selection. <select name=” … "> <option> … <option> … <option> … </select> Form text data input ° For line input: <INPUT TYPE=”text” …> ° For block input: <TEXTAREA NAME=”…” ROWS=value COLS=value> … </TEXTAREA>
Background image of page 2
3 Form submission ° Two things needed for submitting user input: F A submit button or an image: <INPUT TYPE=”submit” …> <INPUT TYPE=”image” SRC=”filename.gif”> F A program to accept the data: <FORM METHOD=”post” ACTION=”filename.cgi”> ° A reset button is nice to have. <INPUT TYPE=”reset”>
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example: <html> <head><title>HTML/CGI Forms Test Page</title></head> <body> <br> <h2>HTML/CGI Forms Test Page</h1> <hr><p> <form method="post" action="http://www.cse.fau.edu/cgi- bin/webp/form_out.cgi"> Check this: <input type="checkbox" name="check" checked><p> Choose something:<p> <input type="radio" name="choice1" value="One" checked>One<br> <input type="radio" name="choice1" value="Two">Two<br> <input type="radio" name="choice1" value="Three">Three<br><p> Choose something else:<p> <select name="choice2"> <option>Red <option>Green <option>Blue </select><p> Type something: <input type="text" name="text1" size="30" value="Foo foo foo"><p> Type something else:<p> <textarea name="text2" rows="5" cols="70">1 2 3 4 5 6 7 8 9 0! @ # $ % ^ & * ( )</textarea><p> <input type="submit"> <input type="reset"><p> </form> </body> </html>
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/13/2011 for the course COP 3813 taught by Professor Staff during the Spring '08 term at FAU.

Page1 / 18

forms - 1 FORMS Forms For collecting user input An advanced...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online