select list show/hide elements: problems in IE Options

select list show/hide elements: problems in IE Options

am 18.10.2007 00:01:29 von punnu35

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
fine
in firefox but not in IE. I have tried all sorts of things but could
not do it. Any help...




onClick="javascript:show_hide()">


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

am 18.10.2007 00:11:15 von Neredbojias

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

> 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
> fine
> in firefox but not in IE. I have tried all sorts of things but could
> not do it. Any help...
>
>
>
>
> > onClick="javascript:show_hide()">
>
>
>

Get rid of this:

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

and use this instead:

document.getElementById("a").style.display="none";

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

--
Neredbojias
Half lies are worth twice as much as whole lies.