Beruflich Dokumente
Kultur Dokumente
ofPrathyaksha
Wollongong
CSCI110University
INDIVIDUAL
PROJECT 2
JavaScript
Table of Contents
1.
2.
Codes used........................................................................................................... 3
3.
4.
2.1.
2.2.
2.3.
Validation............................................................................................................. 4
3.1.
3.2.
Other codes.......................................................................................................... 6
4.1.
4.2.
4.3.
4.4.
4.5.
Table of Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
1:
2:
3:
4:
5:
6:
7:
8:
2. Codes used
2.1.
2.2.
Padding
Margin
div.container
Nav, nav ul, nav ul a
.floating-box
Overflow
Border, background, background-color
Float, clear, width etc.
2.3.
getElementById
addEventListener
querySelector
Array.from
.toggle
.contains
isNaN
Ifelse
Focus()
Nested ifelse
3. Validation
3.1.
4. Other codes
4.1. A part of the HTML code
4.3. A part of the HTML code for the end of the form
5. Conclusion
This project shows the various content and syntax needed to create a form for
users. In this case, the form is for a registering for a magazine. To ensure that the
user enters all the information correctly, two levels of validation are used, field
validation and batch validation.
Some things to take note:
It will not let you go to the next field unless the correct information is entered
in the previous one.
There will be an alert, asking the user if they would like to submit the form or
not, giving them the option of backing out from the registration.
Instead of one final confirm, it is asked twice, to make sure the user is 100%
sure.
Only the second address line is not compulsory.
Only one magazine topic can be chosen for one registration. User has to sign
up again for another one.