400 likes | 478 Views
WEB PAGES: Create & Maintain Week 12 Creating FORMS. FORM. What happens when I press the. Button ?. Guestbook.txt. What happens when I press the. FName =John LName =Smith Computer=PC How=FIOS Website=No ## Fname =Mary Lname =Jones Computer=MAC How=DSL …. Button ?.
E N D
WEB PAGES: Create & Maintain Week 12 Creating FORMS
What happens when I press the Button ?
Guestbook.txt What happens when I press the FName=John LName=Smith Computer=PC How=FIOS Website=No ## Fname=Mary Lname=Jones Computer=MAC How=DSL… Button ?
Form is created using HTML What happens when I press the Button ? Processing of the Information sent by the FORM is completed using a program on the SERVER !
All Servers have these programs • CGI ( Common Gateway Interface ) • Guestbook Program • Or you could create your own… • PHP • AJAX • Java • JavaScript • Perl • C, C+, C++, C# • Ruby, Ruby on Rails • Python • VB. Net What happens when I press the Button ?
What happens when I press the Button ? UDEL has a CGI-Guestbook Program !
FORM TAGS <FORM> </FORM> Options: Method Action = POST = http://udel.edu/cgi-bin/guestbook/~username/filename Program on the Udel Server
FORM TAGS <FORM> </FORM> FORM ELEMENTS <INPUT> Text Boxes Text Area Boxes Check Boxes Option Boxes Drop Down Boxes Hidden Controls Radio Buttons Reset Buttons Submit Buttons Options: Type Name Value Size Width
RESET BUTTON SUBMIT BUTTON
<DocType…… <HTML> <HEAD> <TITLE> Forms</TITLE> <STYLE> </STYLE> </HEAD> <BODY> </BODY> </HTML> <FORM> </FORM>
<FORM Method=“post” Action=“http://udel.edu/cgi-bin/guestbook/~username/yourfilename.txt” > First Name: <INPUT type=“text” size=25 Maxlength=60 name =“fname” > First Name:
<FORM Method=“post” Action=“http:/udel.edu/cgi-bin/guestbook/~username/yourfilename.txt” First Name: <INPUT type=“text” size=25 Maxlength=60 name =“fname” > <p>Last Name: <INPUT type=“text” size=25 maxlength=60 name =“lname”> First Name: Last Name:
<FORM Method=“post” Action=“http:/udel.edu/cgi-bin/guestbook/~username/yourfilename.txt” > First Name: <INPUT type=“text” size=25 maxlength=60 name =“fname” > <p>Last Name: <INPUT type=“text” size=25 maxlength=60 name =“fname” > <INPUT type = “reset” value = “Clear !”> <INPUT type = “submit” value = “Send”> </FORM> First Name: Last Name: Clear ! Send
<FORM Method=“post” Action=“http:/udel.edu/cgi-bin/guestbook/~username/yourfilename.txt” > <INPUT type = “reset” value = “Clear !”> <INPUT type = “submit” value = “Send”> </FORM> Clear ! Send
<FORM Method=“post” Action=“http:/udel.edu/cgi-bin/guestbook/~username/yourfilename.txt” Your Computer: <INPUT type=“checkbox” name=“computer” value=“Apple”> MAC: <INPUT type=“checkbox” name=“computer” value=“Windows”> PC: <INPUT type=“checkbox” name=“computer” value=“Other”> Other: <INPUT type = “reset” value = “Clear !”> <INPUT type = “submit” value = “Send”> </FORM> Your Computer: MAC: PC: OTHER: Clear ! Send
Do you have a website ? <INPUT type=“radio” name=“website” value=“Y”> Yes: <INPUT type=“radio” name=“website” value=“N”> No: <p>Do you have High Speed Internet ? <INPUT type=“radio” name=“highspeed” value=“Y”> Yes: <INPUT type=“radio” name=“highspeed” value=“N”> No: Do you have High Speed Internet ? Do you have a website ? Yes: Yes: No: No:
Why did you choose this course ? <SELECT name=“why” size=1> <option> Choose One <option> Learn how to create a Personal website <option> Replace Bill Gates <option> Other </SELECT> Why did you choose this course? Choose One
Comments: <TEXTAREA name=“comments” cols=60 rows=2> </TEXTAREA> Comments:
Comments: <TEXTAREA name=“comments” cols=60 rows=2> </TEXTAREA> How did you like the course? Comments: How did you like the Course?
Instructors Comments: <TEXTAREA name=“mycomments” cols=60 rows=1 READONLY > Thank you for taking this course ! </TEXTAREA> Instructors Comments: Thank you for taking this course !
Next WeekLAST WEEK Home Work
Next WeekLAST WEEK FRAMES