Javascript Functions+Cookies

Results 1 to 2 of 2

Thread: Javascript Functions+Cookies

  1. #1
    Join Date
    Dec 1969

    Default Javascript Functions+Cookies

    How would you:<BR>write a function that will make sure that the email field is filled in, contains the @ sign,does not contain any whitespspace or the characters "/" "\"or ":" ";"<BR>assume that the form is called "theform" and the email field is called "useremail"<BR>write a function that will insert the curent date in the date field (assume that the form is called "theform" and the date field is called "todaysdate")<BR>and<BR>how would you use javascript to create a cookie <BR>thanks<BR>sinead <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Javascript Functions+Cookies

    Email validate.....<BR>function isValidEmail(emailAddress) {<BR>var re = /^(([^&#060;&#062;()[]\.,;:s@\"]+(.[^&#060;&#062;()[]\.,;:s@\"]+)*)&#124(\".+\"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])&#124(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/<BR>return re.test(emailAddress);<BR>}<BR><BR>Cookie info...<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts