1 / 16

More HTML Forms

More HTML Forms. Document Trees. <html> <h1>Form One</h1> <form name=“ firstForm "> Address<input type="text" name=" address " size="30"> <br>Should we keep it? <input type="checkbox" name=“ keeper ”> <br><input type="radio" name=“ size ”>Small <br><input type="radio" name=" size ">Medium

Download Presentation

More HTML Forms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. More HTML Forms

  2. Document Trees <html> <h1>Form One</h1> <form name=“firstForm"> Address<input type="text" name="address" size="30"> <br>Should we keep it? <input type="checkbox" name=“keeper”> <br><input type="radio" name=“size”>Small <br><input type="radio" name="size">Medium <br><input type="radio" name="size">Large </form> <h1>Form Two</h1> <form name=“secondForm” <br><select name="topping"> <option>Pepperoni <option>Sausage <option>Pineapple <option>Limburger and Onion </select> <br><input type="button" name="myButton" value=“My Button"> </form> </html>

  3. Document Trees document secondForm firstForm myButton topping address keeper size value value value checked [2] [0] [1] checked checked checked

  4. Document Tree Path Names document.firstForm.address.value=“1075 North”; document.secondForm (is a form) document.secondForm.myButton (is a button) document.secondForm.myButton.value (is a string) if (document.firstForm.keeper.checked) {…} if (document.firstForm.size[2].checked) {…} document secondForm firstForm myButton topping address keeper size value value value checked [2] [0] [1] checked checked checked

  5. More Form Widget Events • Button, Check Box, Radio Buttons • onclick • Text Box, Text Area • onchange, onblur, onfocus, onselect • Selection List • onchange, onclick, onblur, onfocus

  6. Text Style Demos

  7. Payroll Demos

  8. Debugging • What is a bug? • In the old days computers would fail because bugs would die on the circuits and short them out • A bug is a problem in a program that you need to find

  9. How do you find the last blue wolf in Minnesota?

  10. Build a fence • Listen for the howl

  11. Build a fence • Listen for the howl

  12. Build a fence • Listen for the howl

  13. Build a fence • Listen for the howl

  14. Debugging with a wolf fence • Make your program do something that will show where the problem is • alert(“any string you want”);

  15. Debugging Demo

  16. Debugging • Find a way to make your problem smaller • Make a copy and cut features out of the copy that don’t relate to your problem • Put in Wolf fences to help you narrow down the problem

More Related