Show up value of select option in IE

Posted by Pete on Stack Overflow See other posts from Stack Overflow or by Pete
Published on 2011-01-03T07:34:19Z Indexed on 2011/01/03 7:54 UTC
Read the original article Hit count: 244

Filed under:

Hello,

I have a problem with a html select object and its options in IE.

My html

<select  id="Select1" onchange="closeMenu1(this.value)">
                                                 <option></option>
                                                 <option>1</option>
                                                 <option>2</option>

And the javascript

            function closeMenu1 (x) {
                                           var show = document.getElementById("divID");
                                           show.innerHTML = x;
                           }

Now, in every browser except the IEs the divID will show up the value which I selected in the select object. But IE doesn’t. Can somebody please tell me a way around that?

Thanks.

© Stack Overflow or respective owner

Related posts about JavaScript