Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hiiii all,

I have two dropdownlist(or select in html) . one depends on the second.
when the first on its select index change , it puts its data on the old data.
I want to clear the old data and then fill new data.
So, Can any onehelp me in that.

Thanks
Posted
Comments
Raju Prajapati 26-Jul-11 4:53am    
plz make more clear your question. if possible, put your code here what you have done.

1 solution

Do this before you fill in the new items
JavaScript
document.getElementById("myDropdown").options.length = 0;
 
Share this answer
 
Comments
moon2011 26-Jul-11 8:27am    
Thanks Alot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900