Helpful Information
 
 
Category: HTML Programming
Layers: Netscape 4.5 vs. IE 4.0

Hi !

I've developed a site which is using layers. Netscape hast no problems to show them, but IE brings up a javascript error. Can someone help me?

Here's the Code:
<HTML>
<SCRIPT TYPE="text/javascript">
function test() {
if (document.layers[0].visibility == "hide") {
document.layers[0].visibility = "show";
} else {
document.layers[0].visibility = "hide";
}
}
function init() {
document.layers[0].visibility = "hide";
}
</SCRIPT>
<BODY onLoad=init()>
<FORM>
<INPUT type=checkbox name=r1 onclick=test()>Radio1<br>
<LAYER>
<INPUT type=radio name=r2 >Radio2<br>
<INPUT type=radio name=r3 >Radio3<br>
</LAYER>
</FORM>
</BODY>
</HTML>

Ciao,
Marco

------------------

Microsoft IE does not support the documents.layers object. Instead, it supports:

document.all

Additionally, Netscape is the only browser supporting the <LAYER> tag. Use <DIV> instead.

------------------
- Jalis










privacy (GDPR)