A
Adrian
How can i get this menu to work in NS 7.1 ????
See example here:
http://www.ascc.com/testmenu.cfm
Thanks,Adrian!
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
No3 = (parseInt(navigator.appVersion) > 3) ? 1:0;
layer = (document.all && No3) ? "document.all['L'+menu].style" :
(document.layers && No3) ? "document.layers['L'+menu]" : 0;
var timer;
function Show() { if(layer) {
if(timer) clearTimeout(timer);
for(menu=0; menu<Layer.length; menu++) { if(Layer[menu])
eval(layer).visibility = "hidden"; } }
for(i=0; i<arguments.length; i++) { menu=arguments;
eval(layer).visibility = "visible"; }
} }
function Hide() { timer = setTimeout("Show()", 500); }
file://-->
</SCRIPT>
<TITLE>MENU</TITLE>
</HEAD>
<BODY BGCOLOR="White" TEXT="Black" LINK="Black" ALINK="Black" VLINK="Black">
<span id="menubar" style="position:relative; visibility:hidden;"></span>
<img src="/image/tab1on.gif" border="0" width="81" height="18"
onMouseOver="Show(1)" onMouseOut="Hide(1)">
<SCRIPT LANGUAGE="JavaScript">
<!--
//////////////////////////////////////////////////////
hovercolor = "c0c0c0"; // color name/code
bgcolor = "314E9E"; // color name/code
background = ""; // picture url
menu_border = 1; // IE only
border_color = "navy"; // IE only
arrow_pic = "script740849_0_2.gif"; // url of arrow picture for submenus
//////////////////////////////////////////////////////
if(document.all) { if(!background) { background=bgcolor; } else { background
= "url("+background+")"; } }
function LayerSpecs(Left,Top,Width) { if(No3) {
if(document.all) { Top+=7; Left+=2; Width-=6; }
this.left = Left;
this.top = Top;
this.info = "";
T=0;
for(i=3; i<arguments.length; i++) {
if(document.all) { this.info += "<TR><TD WIDTH="+Width+"
onMouseOver='this.bgColor=\""+hovercolor+"\"'
onMouseOut='this.bgColor=\"\"'>"+arguments+"</TD></TR>"; }
else { this.info += "<LAYER onMouseOver='this.bgColor=\""+hovercolor+"\"'
onMouseOut='this.bgColor=\""+bgcolor+"\"' WIDTH="+Width+" POSITION=RELATIVE
TOP="+T+"> "+arguments+"</LAYER>"; }
T+=20;
}
} }
Layer = new Array();
arrow = "<IMG SRC='"+arrow_pic+"' WIDTH=6 HEIGHT=10 BORDER=0 ALT=''>";
//////////////////////////////////////////////
Layer[1] = new LayerSpecs(8,26,175,
'<A HREF="/testmenu.cfm" onMouseOver="Show(1)"><font face="arial"
size="1" color="white"><b>Item A</b></font></A> ',
'<A HREF="/testmenu.cfm" onMouseOver="Show(1)"><font face="arial"
size="1" color="white"><b>Item B</b></font></A> ',
'<A HREF="/testmenu.cfm" onMouseOver="Show(1)"><font face="arial"
size="1" color="white"><b>Item C</b></font></A> ',
'<A HREF="/testmenu.cfm" onMouseOver="Show(1)"><font face="arial"
size="1" color="white"><b>Item D</b></font></A> '
);
//////////////////////////////////////////////
j = (Layer[0]) ? 0:1;
for(i=j; i<Layer.length; i++) {
if(document.all && No3) { document.write("<SPAN
onMouseOver='clearTimeout(timer)' onMouseOut='Hide("+i+")' ID='L"+i+"'
STYLE='position:absolute; visibility:hidden; background:"+background+";
top:"+Layer.top+"; left:"+Layer.left+";'><TABLE STYLE='border:solid
"+menu_border+" "+border_color+"'>"+Layer.info+"</TABLE></SPAN>"); }
else if(document.layers && No3) { document.write("<LAYER
onMouseOver='clearTimeout(timer)' onMouseOut='Hide("+i+")' ID='L"+i+"'
POSITION=ABSOLUTE VISIBILITY=HIDDEN BGCOLOR='"+bgcolor+"'
BACKGROUND='"+background+"' TOP="+Layer.top+"
LEFT="+Layer.left+">"+Layer.info+"</LAYER>"); }
}
if(document.all) { document.all["menubar"].style.visibility = "visible"; }
else if(document.layers) { document.layers["menubar"].visibility =
"visible"; }
// -->
</SCRIPT>
</BODY>
</HTML>
See example here:
http://www.ascc.com/testmenu.cfm
Thanks,Adrian!
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
No3 = (parseInt(navigator.appVersion) > 3) ? 1:0;
layer = (document.all && No3) ? "document.all['L'+menu].style" :
(document.layers && No3) ? "document.layers['L'+menu]" : 0;
var timer;
function Show() { if(layer) {
if(timer) clearTimeout(timer);
for(menu=0; menu<Layer.length; menu++) { if(Layer[menu])
eval(layer).visibility = "hidden"; } }
for(i=0; i<arguments.length; i++) { menu=arguments;
eval(layer).visibility = "visible"; }
} }
function Hide() { timer = setTimeout("Show()", 500); }
file://-->
</SCRIPT>
<TITLE>MENU</TITLE>
</HEAD>
<BODY BGCOLOR="White" TEXT="Black" LINK="Black" ALINK="Black" VLINK="Black">
<span id="menubar" style="position:relative; visibility:hidden;"></span>
<img src="/image/tab1on.gif" border="0" width="81" height="18"
onMouseOver="Show(1)" onMouseOut="Hide(1)">
<SCRIPT LANGUAGE="JavaScript">
<!--
//////////////////////////////////////////////////////
hovercolor = "c0c0c0"; // color name/code
bgcolor = "314E9E"; // color name/code
background = ""; // picture url
menu_border = 1; // IE only
border_color = "navy"; // IE only
arrow_pic = "script740849_0_2.gif"; // url of arrow picture for submenus
//////////////////////////////////////////////////////
if(document.all) { if(!background) { background=bgcolor; } else { background
= "url("+background+")"; } }
function LayerSpecs(Left,Top,Width) { if(No3) {
if(document.all) { Top+=7; Left+=2; Width-=6; }
this.left = Left;
this.top = Top;
this.info = "";
T=0;
for(i=3; i<arguments.length; i++) {
if(document.all) { this.info += "<TR><TD WIDTH="+Width+"
onMouseOver='this.bgColor=\""+hovercolor+"\"'
onMouseOut='this.bgColor=\"\"'>"+arguments+"</TD></TR>"; }
else { this.info += "<LAYER onMouseOver='this.bgColor=\""+hovercolor+"\"'
onMouseOut='this.bgColor=\""+bgcolor+"\"' WIDTH="+Width+" POSITION=RELATIVE
TOP="+T+"> "+arguments+"</LAYER>"; }
T+=20;
}
} }
Layer = new Array();
arrow = "<IMG SRC='"+arrow_pic+"' WIDTH=6 HEIGHT=10 BORDER=0 ALT=''>";
//////////////////////////////////////////////
Layer[1] = new LayerSpecs(8,26,175,
'<A HREF="/testmenu.cfm" onMouseOver="Show(1)"><font face="arial"
size="1" color="white"><b>Item A</b></font></A> ',
'<A HREF="/testmenu.cfm" onMouseOver="Show(1)"><font face="arial"
size="1" color="white"><b>Item B</b></font></A> ',
'<A HREF="/testmenu.cfm" onMouseOver="Show(1)"><font face="arial"
size="1" color="white"><b>Item C</b></font></A> ',
'<A HREF="/testmenu.cfm" onMouseOver="Show(1)"><font face="arial"
size="1" color="white"><b>Item D</b></font></A> '
);
//////////////////////////////////////////////
j = (Layer[0]) ? 0:1;
for(i=j; i<Layer.length; i++) {
if(document.all && No3) { document.write("<SPAN
onMouseOver='clearTimeout(timer)' onMouseOut='Hide("+i+")' ID='L"+i+"'
STYLE='position:absolute; visibility:hidden; background:"+background+";
top:"+Layer.top+"; left:"+Layer.left+";'><TABLE STYLE='border:solid
"+menu_border+" "+border_color+"'>"+Layer.info+"</TABLE></SPAN>"); }
else if(document.layers && No3) { document.write("<LAYER
onMouseOver='clearTimeout(timer)' onMouseOut='Hide("+i+")' ID='L"+i+"'
POSITION=ABSOLUTE VISIBILITY=HIDDEN BGCOLOR='"+bgcolor+"'
BACKGROUND='"+background+"' TOP="+Layer.top+"
LEFT="+Layer.left+">"+Layer.info+"</LAYER>"); }
}
if(document.all) { document.all["menubar"].style.visibility = "visible"; }
else if(document.layers) { document.layers["menubar"].visibility =
"visible"; }
// -->
</SCRIPT>
</BODY>
</HTML>