Checking for blank fields

Results 1 to 2 of 2

Thread: Checking for blank fields

  1. #1
    Join Date
    Dec 1969

    Default Checking for blank fields

    Whats the best way of checking multiple fields one after another I have email field working but need username and password fields checked for null values? <BR><BR>&#060;SCRIPT LANGUAGE =Javascript&#062; <BR>function checkAddress() <BR>{ <BR>strAddress = document.forms[ 0 ]. elements["txtEmail"].value; <BR> if (strAddress.indexOf("@") != -1) // contains @ somewhere <BR> return true <BR> else <BR> { <BR>alert ("you need a valid email address"); <BR>return false <BR> } <BR>} <BR><BR>&#060;/SCRIPT&#062; <BR><BR>bearing in mind this bit here <BR>&#060;FORM method="post" onsubmit = "return checkAddress()" action="register.asp?add=true"&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Checking for blank fields

    if ((document.form.textboxname.value == null) &#124&#124 (document.form.textboxname.value == &#039;&#039;))

Posting Permissions

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