» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-09-2005, 06:38 AM
jamm jamm is offline
Junior Member
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
jamm is on a distinguished road
Default Drop Downs ?

hi,

I have 5 drop downs, I want to not let the user select the same name is 5 drop downs. Give me ideas, how i can compare them


if(document.frm1.clothes1.value==document.frm1.clo thes2.value==document.frm1.clothes3.value=document .frm1.clothes4.value
=document.frm1.clothes5.value)
{
alert("same values");
return false;
}

It is not working at all. Help me to sort this problem. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 12-09-2005, 06:43 AM
gavvy gavvy is offline
OSP Starters
 
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gavvy is on a distinguished road
Default Codes

Hi,
I think because you have to check each possible combination where the values can be equal ... you IF statement will have 10 combinations and should be seperated by || (OR) not && (AND).

Code:

clothes1 = document.frm1.clothes1.value;
clothes2 = document.frm1.clothes2.value;
clothes3 = document.frm1.clothes3.value;
clothes4 = document.frm1.clothes4.value;
clothes5 = document.frm1.clothes5.value;

if ((clothes1 == clothes2) || (clothes1 == clothes3) || (clothes1 == clothes4) || (clothes1 == clothes5) || (clothes2 == clothes3) || (clothes2 == clothes4) || (clothes2 == clothes5) || (clothes3 == clothes4) || (clothes3 == clothes5) || (clothes4 == clothes5)) {
alert('same values');
return false;
} -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop in Traffic !! anyone else domin Google 6 10-19-2007 08:21 PM
.in domains drop list, feb was registration month tnc Domain Names Forum 1 02-07-2007 10:44 AM
why sudden drop happened of web site traffic ? phelps MSN 7 09-17-2006 08:27 PM
have a sudden drop like mine? phelps Google 6 09-05-2006 12:24 PM
SQLFusion Releases Drag Drop Site Creator outsourcingplans Web Hosting News 0 12-05-2005 04:43 PM


All times are GMT. The time now is 01:19 AM.