diff options
Diffstat (limited to 'examples/webkit/formextractor/form.html')
-rwxr-xr-x | examples/webkit/formextractor/form.html | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/examples/webkit/formextractor/form.html b/examples/webkit/formextractor/form.html new file mode 100755 index 0000000..18ddff1 --- /dev/null +++ b/examples/webkit/formextractor/form.html @@ -0,0 +1,64 @@ +<html><script> +function extractFormValues() +{ + var firstName = document.getElementById("firstname").value; + var lastName = document.getElementById("lastname").value; + var maleGender = document.getElementById("genderMale"); + var femaleGender = document.getElementById("genderFemale"); + + var gender = ""; + if (maleGender.checked) + gender = maleGender.value; + else if (femaleGender.checked) + gender = femaleGender.value; + + var updates = document.getElementById("updates").checked; + + formExtractor.setValues(firstName, lastName, gender, updates); +} +</script><body> +<h1> +The Green People Book Club +</h1> + +<p> +Welcome to The Green People Book Club. Please register to obtain a membership with us. +</p> + <form onsubmit="extractFormValues()"> + <table> + <tbody><tr> + <td> + First name: + </td> + <td> + <input type="text" id="firstname"> + </td> + </tr> + <tr> + <td> + Last name: + </td> + <td> + <input type="text" id="lastname"> + </td> + </tr> + <tr> + <td> + Gender: + </td> + <td> + <input type="radio" name="gender" id="genderMale" value="Male"> Male + <input type="radio" name="gender" id="genderFemale" value="Female"> Female + </td> + </tr> + <tr> + <td colspan="2"> + <input type="checkbox" id="updates" value="receive"> + Check here if you would like to receive regular updates from us: + </td> + </tr> + </tbody></table> + <input type="submit" value="Submit"> + </form> + +</body></html>
\ No newline at end of file |