select list show/hide elements: problems in IE Options

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to do this simple thing in html. I have a select list and
when you click the button the first element should hide. It works
in firefox but not in IE. I have tried all sorts of things but could
not do it. Any help...

<select id="pid" name="pid" multiple>
<option id="a" value="a">a</option>
<option id="b" value="b">b</option>
<option id="c" value="c">c</option>
<input name="submit" value="Start Analysis" type="button"
<script type="text/javascript">
        function show_hide() {
        var a = document.getElementById("a");"none";

Re: select list show/hide elements: problems in IE Options

Well bust mah britches and call me cheeky, on Wed, 17 Oct 2007 22:01:29 GMT  

Quoted text here. Click to load it
Get rid of this:

  var a = document.getElementById("a");"none";

and use this instead:


Also, I presume you have a form enclosing the form elements.

Half lies are worth twice as much as whole lies.

Site Timeline