• Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

HTML Forms.

Extracts from this document...

Introduction

HTML Forms If you have been searching on the Internet then there is a very good chance you have used HTML forms. They are the most popular way of gathering information from the user (client) and sending it to the server. If you want to see a form in action just go to google.com and enter a something into the search box. That is a form. So how we go about creating one of these then? Well as with everything in HTML it is all about tags: <form action=http://www.google.com/search method="get"> <input type="text" name="q"> <input type="submit"> </form> The code above, if placed inside a HTML documents BODY tag, will create a simple form like the one below: Exercise 1. 1. Type in the above code in a new HTML document, save it as form1.htm 2. Opening it in a browser, does it look like the screenshot above? 3. ...read more.

Middle

Lucky one is provided for you, the submit button. Basic Form Inputs Text Boxes <input type="text" name="text1" maxlength="100"> <input type="text" name="text2"> <input type="text" name="text3" value="Enter some text here"> Password Boxes (hide the users input) <input type="password" name="password1"> Select Boxes (combo boxes) <select name="combo1"> <option value="Number1">One</option> <option value="Number2" selected>Two</option> <option value="Number3">Three</option> </select> Note the selected property in the second option tag tells the browser that this option should be the one selected as default when the page first loads. Exercise 2. 1. Save your HTML file as form2.htm 2. Remove the text field code from the previous exercise. 3. Edit the file to hide the text users enter on your form. 4. Test your changed in the browser 5. Ask the lecturer to confirm your findings. Exercise 3. 1. Save you HTML file as form3.htm 2. Remove the password field code from the previous exercise. 3. Edit the file to include a Select box with five search options: a. ...read more.

Conclusion

<input type="radio" name="radio1" value="one"> One <br> <input type="radio" name="radio1" value="two"> Two <br> <input type="radio" name="radio1" value="three"> Three <br> Note: Radio buttons are grouped together by setting the name property to be the same for all the buttons in the group. Once the form is submitted it is the setting stored in the value property of that radio button that is sent to the server and not the text that follows it. Exercise 5. 1. Save your HTML file as form5.htm 2. Remove the text area code from the previous exercise. 3. Edit your file to include five radio buttons on your form ensuring: a. Each one is on a separate line b. Each one searches for a different music Band 4. Test your page in your browser 5. Confirm your findings with your lecturer Exercise 6. 1. Create a new HTML page. 2. Include a form and set its action property to: http://www.multimap.co.uk/map/places.cgi 3. Include a text field named "quicksearch" 4. Include a submit button. 5. Test your form in your browser 6. Confirm your findings with your lecturer ...read more.

The above preview is unformatted text

This student written piece of work is one of many that can be found in our AS and A Level Advertisements section.

Found what you're looking for?

  • Start learning 29% faster today
  • 150,000+ documents available
  • Just £6.99 a month

Not the one? Search for your essay title...
  • Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month
  • Over 160,000 pieces
    of student written work
  • Annotated by
    experienced teachers
  • Ideas and feedback to
    improve your own work