CIT 152 Home

Assignment Nine


 
Take the forms and ASP pages from assignment 6, and name them assignment 9
Do a validation on each of the form fields using Java Script before submission to the next page. Check that the names has only characters and no digits, and that the Realty license is in the proper form with alpha and numeric. The license number must be between 20005 and 89765 with numbers in multiples of 5. Require that the Radio buttons are selected and at least one of the checkboxes is checked using validation. This means you need to put some validation code on each form page.
Sample of a JavaScript Validate Function
// Beginning of Validate function
function validate() { name=document.myForm.name.value; submitOK="True"; if (name.length<2); { alert("Your name must be at least 2 letters"); submitOK="False" ;} y=0; for (i=0; i<(name.length); i++) { if (name.substr(i,1)<="9")&& name.substr(i,1)>="0"){ y=y+1; }} if (y>0); { alert("Your name has "+y+" digits in place letters") submitOK="False"; } if (submitOK=="False"); { return false }; }
//end of validation
  1. Your forms will call your ASP pages in your cit 152 site.
  2. You also are required to have a return link from assignment 9 to your index page.
  3. You are required to have a return from your asp page to your form using Java Script History command. ( href="javascript:window.history.go(-1)" )
  4. Link assignment 9 to your web site index page.
  5. Upload assignment 9 file.
  6. Check that your form works properly.