VirtualMV/JavaScript/Case Study: Forms/Create Form/Content

Creating a Form
The first step to form validation is of course creating the actual form: For this case study I will be using a DVD Hire business as my example.



Design Notes
1. Create the following files
 * vmv_js-index.html = main html file
 * vmv_js-style.css = cascading style sheet file
 * vmv_js-index.js  = File containing JavaScripts
 * vmv_js-NewReleases.html = html page describing New Releases

2. Add the following to the head section of the main html file (To link the css and js files)

3. "Welcome to .." is h1

4. "Customer details", "Totals", etc.. are h4

5. Use the following styles to vmv_js-index.css. Floating BOTH left will make sure that the two columns flow correctly.

6. Use a style to space out the field names (e.g. "Name (Last, First)")

7. Put txt in front of the field names and use CamelCase, for example

8. Put btn in front of the button names and use Camel Case, for example:

9. For the buttons onclick call the following functions
 * Check Data = fnCheckData
 * Display Rental List = fnDisplayForm
 * New Release = fnNewReleases

10. Today's Date will be called using a function fnDisplayTodaysDate;

11. The Add Item button will be called using a function called fnAddItem;

12. Use the following code for the Rental List table