SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 13th, 2000, 11:22 AM
kirk kirk is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 1 kirk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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
}


Reply With Quote
  #2  
Old May 14th, 2000, 09:09 PM
jonherron jonherron is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 24 jonherron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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 "| |".

Reply With Quote
  #3  
Old May 14th, 2000, 09:10 PM
jonherron jonherron is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 24 jonherron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
excuse me, i ment "| |"

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > problem with if construct


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway