i have two frames as follows. The first one has alink which shows up a menu on the next frame. The following is the code for menu layer:
<SCRIPT LANGUAGE="JavaScript1.2" SRC="drift.js"></SCRIPT>
<div id=dropmenu0 style="position:absolute;left:100;top:100;background-color:#CCCCCC;width:150;visibility:hidden;border:1px solid black ;padding:0px" >
<script language="JavaScript1.2">
if (document.all)
dropmenu0.style.padding="1px"
estr='<table border=0 width="150" bordercolor=black cellpadding="1" cellspacing="0">'
estr+='<tr><td align="left" class=menu onmouseover=this.style.background="#FF0000" onmouseout=this.style.background="#CCCCCC">'
for (i=0;i<menu1.length;i++)
document.write(estr + menu1+'</td></tr></table>')//loads
the array containing the links
</script>
</div>
the code for the top menu which shows and hides this layer is follows:
<script language="JavaScript1.2">
function show(w,object) {
if (w.document.layers && w.document.layers[object] != null)
w.document.layers[object].visibility = 'visible';
else if (document.all)
w.document.all[object].style.left=4
w.document.all[object].style.top=0
w.document.all[object].style.visibility = 'visible';
}
function hide(w,object) {
if (w.document.layers && w.document.layers[object] != null)
w.document.layers[object].visibility = 'hidden';
else if (document.all)
w.document.all[object].style.visibility = 'hidden';
}
</script>
<A href ="" onclick="show(parent.content,'dropmenu0');return false">
Now my problem is that i want the menu to show on click which it does but onmouseout of the layer it should hide. It gives me a problem if i put the onmouseover in the div tag. is there a solution.Please help
<SCRIPT LANGUAGE="JavaScript1.2" SRC="drift.js"></SCRIPT>
<div id=dropmenu0 style="position:absolute;left:100;top:100;background-color:#CCCCCC;width:150;visibility:hidden;border:1px solid black ;padding:0px" >
<script language="JavaScript1.2">
if (document.all)
dropmenu0.style.padding="1px"
estr='<table border=0 width="150" bordercolor=black cellpadding="1" cellspacing="0">'
estr+='<tr><td align="left" class=menu onmouseover=this.style.background="#FF0000" onmouseout=this.style.background="#CCCCCC">'
for (i=0;i<menu1.length;i++)
document.write(estr + menu1+'</td></tr></table>')//loads
the array containing the links
</script>
</div>
the code for the top menu which shows and hides this layer is follows:
<script language="JavaScript1.2">
function show(w,object) {
if (w.document.layers && w.document.layers[object] != null)
w.document.layers[object].visibility = 'visible';
else if (document.all)
w.document.all[object].style.left=4
w.document.all[object].style.top=0
w.document.all[object].style.visibility = 'visible';
}
function hide(w,object) {
if (w.document.layers && w.document.layers[object] != null)
w.document.layers[object].visibility = 'hidden';
else if (document.all)
w.document.all[object].style.visibility = 'hidden';
}
</script>
<A href ="" onclick="show(parent.content,'dropmenu0');return false">
Now my problem is that i want the menu to show on click which it does but onmouseout of the layer it should hide. It gives me a problem if i put the onmouseover in the div tag. is there a solution.Please help