Form Field Validation

Results 1 to 2 of 2

Thread: Form Field Validation

  1. #1
    Join Date
    Dec 1969

    Default Form Field Validation

    Hi all;<BR><BR>I am trying to validate an HTML form so that the user may not leave a field blank.<BR><BR>This is the code I am using:<BR><BR>if(document.Users.LastName.value=="" )<BR>{<BR>alert(&#039You have not entered a LAST NAME in this form.&#039); document.Users.LastName.focus(); return(false);<BR>}<BR><BR>However, if I enter a few spaces in the field, it gets through my validation. How can I modify the above to correct this?<BR><BR>Danke!<BR>Heather

  2. #2
    moti Guest

    Default RE: Form Field Validation

    You are right you get on if he makes spaces as a space in hcsi is +<BR>but any ways at lest he does not show all the information you have stored only ++++<BR>if you want to check this you must do the Charat(+)

Posting Permissions

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