943,691 Members | Top Members by Rank

Ad:
Aug 17th, 2007
0

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

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Light Poster
BalagurunathanS is offline Offline
26 posts
since Apr 2007
Aug 17th, 2007
0

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

javascript Syntax (Toggle Plain Text)
  1. document.getElementById('ddl2').selectedIndex = 0;


cya
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Nandem is offline Offline
3 posts
since Aug 2007
Aug 18th, 2007
0

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

Click to Expand / Collapse  Quote originally posted by Nandem ...
javascript Syntax (Toggle Plain Text)
  1. document.getElementById('ddl2').selectedIndex = 0;


cya


Thanks Nandem..I got it...


Regards,
Bala
Reputation Points: 10
Solved Threads: 0
Light Poster
BalagurunathanS is offline Offline
26 posts
since Apr 2007
Aug 18th, 2007
0

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

No problem.
You're welcome
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Nandem is offline Offline
3 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: progress bar for fileupload using javascript
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Password protect code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC