If Statment

Results 1 to 2 of 2

Thread: If Statment

  1. #1
    Join Date
    Dec 1969

    Default If Statment

    I want to verify that the fields in my form have been filled in and this is my code:<BR><BR> if (document.frm_lkp_optn.lkp_fnme.value == "") and _<BR> (document.frm.lkp_inst.value == "") and _<BR> (document.frm.lkp_dept.value == "") and _<BR> (document.frm.lkp_addr.value == "") and _<BR> (document.frm.lkp_code.value == "") and _<BR> (document.frm.lkp_mail.value == "") and _<BR> (document.frm.lkp_nmbr.value == "") {<BR> <BR> alert("You MUST enter something to search on");<BR><BR> }<BR><BR>I am assuming that it is the ands I am using to group my statment which are failing, but I don&#039;t know how you would do this.<BR><BR>Can anyone help?<BR><BR>Thank You in advance.<BR>

  2. #2
    fenasikerim Guest

    Default RE: If Statment

    use OR instead of AND

Posting Permissions

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