acetrader wrote:

Hi there,

The problem is that when I assign the dropdown value to a variable called
dropdown in the following line of code "var dropdown =
document.getElementById('ddlChannelSelect');" it works in IE but not in the
other browsers, I have debbugged this in FireBug and it seems that the
variable dropdownlist is not actually getting the value of the actual
dropdownlist nad it says 'null' or sometimes 'undefined'. Am I doing
something wrong ? why is it that it is working in IE but not in other
browsers ? can you pls give me a solution with some examples ?
[snip]
Thank you very much,
  :)

My guess is that the html for your selectbox is <select name="ddlChannelSelect">. IE will (wrongly) return this element when you call getElmentById, but other browsers won't, because that's not really an idea. Just add id="ddlChannelSelect" to your <select> element.

And if you're using jQuery, use $('#ddlChannelSelect') instead of getElementById.

Jonathan

--
Jonathan Vanherpe - Tallieu & Tallieu NV - jonat...@tnt.be

Reply via email to