User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 397,983 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,719 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 6516 | Replies: 3
Reply
Join Date: Apr 2007
Posts: 26
Reputation: BalagurunathanS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
BalagurunathanS's Avatar
BalagurunathanS BalagurunathanS is offline Offline
Light Poster

How to make selected index zero for dropdown list box in java script..?

  #1  
Aug 17th, 2007
Hi all..

I am having two dropdown list boxes in my .aspx page

They are ddl1 and ddl2...

Now if i change the selected index of the first box (ddl1), the selected index of the second dropdownlist must automaticlly set to zeroth index..i.e index of the second dropdown list box should be set to zero..Somebody provide me with the code in java script as early as posible..

Regards,
Balagurunathan S
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Posts: 3
Reputation: Nandem is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Nandem Nandem is offline Offline
Newbie Poster

Re: How to make selected index zero for dropdown list box in java script..?

  #2  
Aug 17th, 2007
  1. document.getElementById('ddl2').selectedIndex = 0;


cya
Reply With Quote  
Join Date: Apr 2007
Posts: 26
Reputation: BalagurunathanS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
BalagurunathanS's Avatar
BalagurunathanS BalagurunathanS is offline Offline
Light Poster

Re: How to make selected index zero for dropdown list box in java script..?

  #3  
Aug 18th, 2007
Originally Posted by Nandem View Post
  1. document.getElementById('ddl2').selectedIndex = 0;


cya




Thanks Nandem..I got it...


Regards,
Bala
Reply With Quote  
Join Date: Aug 2007
Posts: 3
Reputation: Nandem is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Nandem Nandem is offline Offline
Newbie Poster

Re: How to make selected index zero for dropdown list box in java script..?

  #4  
Aug 18th, 2007
No problem.
You're welcome
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 1:06 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC