I have the following menu. It works fine in IE only but it doesn't doesn't work in Firefox, Netscape I didn't try it in Opera but I assume that it wouldn't work in that either. Can someone please tell how can I make it work in all the browsers. Is there something wrong with code or how I can fix this.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
<!--
a:hover{color:blue}
a{text-decoration:none}
.look{font:bold 16pt Garamond,Arial;}
.look2{font:bold 12pt Garamond,Arial;}
.folding{cursor:hand}
a:active{color:red}
ul {
list-style: none; /*gets rid of list markers*/
margin: 0; /*removes margins*/
padding: 0px; /*sets indent across browsers*/
}
//-->
</style>
<script language="JavaScript">
<!--
//By George Chiang ( JavaScript site.
img1=new Image()
img1.src="fold.gif"
img2=new Image()
img2.src="open.gif"
ns6_index=0
function change(e)
{
if(!document.all&&!document.getElementById)
return
if (!document.all&&document.getElementById)
ns6_index=1
var source=document.getElementById&&!document.all? e.target:event.srcElement
if (source.className=="folding")
{
var source2=document.getElementById&&!document.all? source.parentNode.childNodes:source.parentElement.all
if (source2[2+ns6_index].style.display=="none")
{
source2[0].src="open.gif"
source2[2+ns6_index].style.display=''
}
else
{
source2[0].src="fold.gif"
source2[2+ns6_index].style.display="none"
}
}
}
document.onclick=change
//-->
</script>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<div class="look"><img src="fold.gif" class="folding"> <a href=" 3</a>
<ul class="look2" style="list-style-image:url(list.gif);display:show">
<li><a href="fdddf">Link 3a</a></li>
<li><a href="fdddf">Link 3b</a></li>
<li><div class="look"><img src="fold.gif" class="folding"> <a href="#">Menu 2</a>
<ul class="look2" style="list-style-image:url(list.gif);display:none">
<li><a href="fdddf">Link 2a</a></li>
<li><a href="fdddf">Link 2b</a></li>
<li><a href="fdddf">Link 2c</a></li>
</ul>
</div>
</li>
</ul>
</div>
</BODY>
</HTML>
[/code]
Any help is appreciated. Thanks
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
<!--
a:hover{color:blue}
a{text-decoration:none}
.look{font:bold 16pt Garamond,Arial;}
.look2{font:bold 12pt Garamond,Arial;}
.folding{cursor:hand}
a:active{color:red}
ul {
list-style: none; /*gets rid of list markers*/
margin: 0; /*removes margins*/
padding: 0px; /*sets indent across browsers*/
}
//-->
</style>
<script language="JavaScript">
<!--
//By George Chiang ( JavaScript site.
img1=new Image()
img1.src="fold.gif"
img2=new Image()
img2.src="open.gif"
ns6_index=0
function change(e)
{
if(!document.all&&!document.getElementById)
return
if (!document.all&&document.getElementById)
ns6_index=1
var source=document.getElementById&&!document.all? e.target:event.srcElement
if (source.className=="folding")
{
var source2=document.getElementById&&!document.all? source.parentNode.childNodes:source.parentElement.all
if (source2[2+ns6_index].style.display=="none")
{
source2[0].src="open.gif"
source2[2+ns6_index].style.display=''
}
else
{
source2[0].src="fold.gif"
source2[2+ns6_index].style.display="none"
}
}
}
document.onclick=change
//-->
</script>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<div class="look"><img src="fold.gif" class="folding"> <a href=" 3</a>
<ul class="look2" style="list-style-image:url(list.gif);display:show">
<li><a href="fdddf">Link 3a</a></li>
<li><a href="fdddf">Link 3b</a></li>
<li><div class="look"><img src="fold.gif" class="folding"> <a href="#">Menu 2</a>
<ul class="look2" style="list-style-image:url(list.gif);display:none">
<li><a href="fdddf">Link 2a</a></li>
<li><a href="fdddf">Link 2b</a></li>
<li><a href="fdddf">Link 2c</a></li>
</ul>
</div>
</li>
</ul>
</div>
</BODY>
</HTML>
[/code]
Any help is appreciated. Thanks