PDA

View Full Version : hidden to visible


many_tentacles
07-11-2006, 10:24 AM
hi

I have a page which works fine in Safari but it doesn't seem to work in any other browsers and I can't work out why.

www.tombrennand.net/test.htm (http://www.tombrennand.net/test.htm)

When you click on the tab, it should reveal the box where info will be placed. Then when you click on the tab again, it should hide the box.

It only does that in Safari though which aint so good.

Anyone got any ideas?

Thanks

Arbitrator
07-11-2006, 11:20 AM
You need to use getElementById():

<a onclick="getElementById("tom").style.visibility = 'visible';"></a>
<a onclick="getElementById("tom").style.visibility = 'hidden';"></a>

many_tentacles
07-11-2006, 12:20 PM
ok, thanks for that... I've managed to adapt a bit of javascript that I had from something else to make it work...

So I've made a few tabs and only one stays open at any one time.

This works fine in all browsers except IE... any ideas why.

its at www.tombrennand.net (http://www.tombrennand.net/)

thanks