Re: Setting several styles within one javascript function



Michael Winter <m.winter@xxxxxxxxxxxxxxxx> wrote:

>>> function panel() {
>>> document.getElementById('panel').style.display='hidden';
>
>The value, hidden, doesn't apply to the display property

Oops, the result of simplifying the code for the post, I inserted the
wrong code.

A minimized test case that closely resembles what I'm actually trying to
do is: http://homepage.ntlworld.com/spartanicus/temp.htm

This "works" if I comment out the second statements, if I leave them in
it fails and produces runtime errors.

>A well-written script will be robust, and test its environment before
>using any features.

I'm not skilled enough to understand feature detection, or to write
elegant javascript code. All my javascript is used for optional fluff
only, no harm done if it doesn't work.

--
Spartanicus
.