Assignment 3: Client-Side Processing with HTTP
Instructions: In Assignment 2 you developed tools that allow people to open new accounts with the fictitious company HandyRides. In this assignment you will add client-side processing to the HTML page that you developed for that assignment. In particular, you should ensure that the new account information is only sent to the server if all of the required fields have been completed.
Specifically, you should:
- Write and test:
- A JavaScript function isBlank that determines whether a FORM element is blank or not.
- A JavaScript function checkRequired that checks the required elements of a FORM to determine if any of them are blank and alerts the user as appropriate.
- An HTML page similar to the one you developed for Assignment 2 named newaccount2.html that makes use of these two JavaScript functions.
- Write and test:
- A JavaScript function loadSplashPage.js that loads a splash page when appropriate.
- A splash page that you want only first-time users to see. (You are assuming that return users don't need nor want to see this information).This Splash page should contain the registration information for the event that the HandyRides Plug-in is supporting. It should look as much like the original event registration page, with the addition of the HandyRides motivation information, requests for participation, interface elements that allow the user to enthusiastically and easily provided useful additional information that will enable HandyRides to create ride-share opportunities.
- Modifications to the HTML pages that you developed in Assignment 1, and Assignment 2 to make use of loadSplashPage.
- Discuss how the JavaScript function checkRequired could/should be made more generic (i.e., so that the same functions could be used with a variety of different HTML pages without having to be modified).
- Describe other ways in which JavaScript functions might be used to improve the functionality of HandyRides pages.
- Discuss the advantages and disadvantages of saving state information (e.g. information about previous usage) on the client versus saving it on the server.
You may use any books or notes at your disposal, but you should work entirely on your own.