In lab 10, we had to create 10 forms using javascript. We had to make a separate receiver html page so, when the person clicks "send" button, it will say I have received your message. The "clear" form button clears all the information typed by the user. However, a person can't send me unless the user have typed in a password. For forms 1-3, the user only had to type in 1 password. However, through forms 4-8, the user have to type in two similar password. If the passwords doesn't match, it wouldn't let the user go to the receiver page. For forms 9-10, we had to create a destination form, where the user can decide which page they want to go.
Doing form 1 was the most easiest form to do out of all the 10 forms. As you can see on the bottom, my html/javascript coding for form 1. I told javascript, if someone did't type in a password, turn false and tell the user "Password field must be supplied." But, if a user did type in a password, return true and go to the receiver page which I linked in my html coding. Doing all the other forms was some what similar but adding a little bit more to it.
Form 1 Coding:
HTML
JavaScript
My HTML Coding
This lab helped me learned how to create different kinds of forms. Now, I can create a form with 1 or more passwords and doesn't let the user go forward until all the information is filled. I can use it in my future labs/projects.
My JAVASCRIPT coding
No comments:
Post a Comment