HighDots Forums  

Help finishing my assignment PLEASE

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Help finishing my assignment PLEASE in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alley
 
Posts: n/a

Default Help finishing my assignment PLEASE - 02-20-2005 , 08:48 PM






Can someone help me? Please look at this form and tell me how to accomplish the following validations? I am completely lost! Having to work on someone else's form is tough!! http://users.adelphia.net/~woduffy/A...ent1in420D.htm

1.. Make the name, address, city, state, zip, phone, email, date of birth, travel account number, PIN, credit card type, credit card number and credit card expiration date fields required.
2.. Limit the state field to 2 alphabetic characters and force to uppercase onBlur and when submitted.
3.. Limit the ZIP code to either 5 or 10 digits (with a dash) only.
4.. Make sure that the phone number is a valid phone number.
5.. Make sure that the email address is a valid email address.
6.. Make sure the date of birth is a valid date.
7.. Make sure that the travel account number is a six digit number.
8.. Make sure that the PIN is a four digit number.
9.. The credit card popup starts with an invalid option. Be sure to check that they have selected one of the valid options.
10.. Make sure the credit card number only allows digits (12 or 16) with no spaces.
11.. Make sure the credit card expiration date is a valid expiration date.

If any errors in the input are found when the user clicks "Submit", an alert should be presented with a list of all the errors and the submit should be cancelled.

Add an onblur handler to all text fields such as name, address, email, etc. that trims leading and trailing whitespace.

Reply With Quote
  #2  
Old   
Enkidu
 
Posts: n/a

Default Re: Help finishing my assignment PLEASE - 02-22-2005 , 09:54 PM






Alley <dufchick (AT) adelphia (DOT) net> wrote on Sunday 20 February 2005 17:48:

Quote:
Can someone help me? Please look at this form and tell me how to
accomplish the following validations? I am completely lost! Having to
work on someone else's form is tough!!
http://users.adelphia.net/~woduffy/A...ent1in420D.htm

1.. Make the name, address, city, state, zip, phone, email, date of
birth, travel account number, PIN, credit card type, credit card number
and credit card expiration date fields required. 2.. Limit the state
field to 2 alphabetic characters and force to uppercase onBlur and when
submitted. 3.. Limit the ZIP code to either 5 or 10 digits (with a dash)
only. 4.. Make sure that the phone number is a valid phone number. 5..
Make sure that the email address is a valid email address. 6.. Make sure
the date of birth is a valid date. 7.. Make sure that the travel account
number is a six digit number. 8.. Make sure that the PIN is a four digit
number. 9.. The credit card popup starts with an invalid option. Be sure
to check that they have selected one of the valid options. 10.. Make
sure the credit card number only allows digits (12 or 16) with no
spaces. 11.. Make sure the credit card expiration date is a valid
expiration date.

If any errors in the input are found when the user clicks "Submit", an
alert should be presented with a list of all the errors and the submit
should be cancelled.

Add an onblur handler to all text fields such as name, address, email,
etc. that trims leading and trailing whitespace.
http://www.webmonkey.com

Look for Thau's JS and Advanced JS tutorial. You should then be able to
complete your homework assignment on your own.

Enkidu
--
--
There is in certain living souls
A quality of loneliness unspeakable,
So great it must be shared
As company is shared by lesser beings.
Such a loneliness is mine; so know by this
That in immensity
There is one lonelier than you.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.