On the index page, add a link that says "Subscribe To Our Marketing List". Clicking the link should take the user to another page that contains a signup form. The form should contain a subscribe button and the following text fields: Email Address, Re-enter Email Address, First Name. Using java create a script called subscribe.js, In the subscribe.js script, it should add an event for the subscribe button that listens for the onclick event. When the onclick event occurs, it should validate that the email text matches the re-enter email text and that the first name textbox is not empty. If the validation fails for either, display the appropriate error message beside the textbox. For example, This entry must equal the first entry, This field is required. If validation is successful, display an alert that says thanks for joining our list and remember to include your script on the page.
On the index page, add a link that says "Subscribe To Our Marketing List". Clicking the link should take the user to another page that contains a signup form. The form should contain a subscribe button and the following text fields: Email Address, Re-enter Email Address, First Name.
Using java create a script called subscribe.js, In the subscribe.js script, it should add an event for the subscribe button that listens for the onclick event. When the onclick event occurs, it should validate that the email text matches the re-enter email text and that the first name textbox is not empty. If the validation fails for either, display the appropriate error message beside the textbox. For example, This entry must equal the first entry, This field is required. If validation is successful, display an alert that says thanks for joining our list and remember to include your script on the page.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps