I have a dropdown present in a div and i am displaying that div in a floatbox on the click of a checkbox using javascript.

My problem is that the value of the dropdown that i am selecting is stored in a hiddenfield before closing the floatbox.
But when i open that floatbox again i have set the dropdown value as it is in the hiddenfield.After checking the value that has been set in dropdown in running mode it showing me the correct value but it is displaying the --select-- value only.

All this is happening only in mozilla and chrome browser and not in IE.

PLZ HELP ASAP,
Thanks for reading my post.

When you set the selectedValue with javascript it does not update the UI, for it to work, as you wish, you have to set the selectedIndex property.

If you don't have the selected index you may loop the select options and test the values to find the right index.

Hope it helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.