#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    1
    Rep Power
    0
    I put the following code in, but the first condition is never met! Why?

    function verification()
    {
    /* VERIFY THAT COMPANY NAME IS ENTERED */
    if ((document.newcompfrm.compname.value=='')| |(document.newcompfrm.compname.value==' '))
    {
    alert('You must enter a company name!')
    document.newcompfrm.compname.focus()
    return false
    }

    /* VERIFY THAT A COMPANY CLASSIFICATION CODE WAS SELECTED */
    if (document.newcompfrm.cccsel.options[document.newcompfrm.cccsel.selectedIndex].value=='')
    {
    alert('You must select a Company Classification Code!')
    document.newcompfrm.cccsel.focus()
    return false
    }

    document.newcompfrm.submit()
    return true
    }

  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    24
    Rep Power
    0
    What I spot right off the bat that could be preventing the condition from being met, is your OR operand "| |" should not contain a space, making it "| |".
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    24
    Rep Power
    0
    excuse me, i ment "| |"

Similar Threads

  1. UTF-8 problem in 4.1.1a
    By mehran20 in forum MySQL Help
    Replies: 1
    Last Post: February 8th, 2004, 03:21 PM
  2. Redirection problem with frames.....
    By ykwongss in forum PHP Development
    Replies: 0
    Last Post: January 21st, 2003, 11:07 AM
  3. PHP / Cron / Shell Script problem, help needed
    By badhaiku.dk in forum PHP Development
    Replies: 3
    Last Post: January 9th, 2003, 01:08 PM
  4. Text formatting problem with mysql
    By DaveK in forum PHP Development
    Replies: 1
    Last Post: September 3rd, 2001, 02:55 PM
  5. ld problem in Apache build w/ PHP
    By Eric Anderson in forum Apache Development
    Replies: 3
    Last Post: April 9th, 2001, 02:18 AM

IMN logo majestic logo threadwatch logo seochat tools logo