954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

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

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

BalagurunathanS
Light Poster
26 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 
document.getElementById('ddl2').selectedIndex = 0;

cya

Nandem
Newbie Poster
3 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 
document.getElementById('ddl2').selectedIndex = 0;

cya





Thanks Nandem..I got it...


Regards,
Bala

BalagurunathanS
Light Poster
26 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

No problem.
You're welcome

Nandem
Newbie Poster
3 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You