IE5 + ok, netscape 7.1 no workie

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+">&nbsp;"+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>
 
O

orlando echevarria

Adrian,

NS7.1 does not recognize the HTML Layer tag. The Layer tag is NS4.x and
is not used in the W3C standard. Therefore you're going to have to use
the document.getElementById(HTML_id) method to expose the element you
want. Also, if you want NS7.1 to look at a layer, you're going to have
to use DIV tags rather than LAYER tags.

Orlando
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+">&nbsp;"+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>
 
D

DU

Adrian said:
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+">&nbsp;"+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>


First, make sure your html markup code is valid. Right there, it's not
the case for your webpage. You need to use a doctype declaration.

http://validator.w3.org/
http://www.hut.fi/u/hsivonen/doctype.html

Then, consult the following pages to make adjustements:

http://jibbering.com/faq/#FAQ4_26

Updating DHTML Web Pages for next generation browsers
http://devedge.netscape.com/viewsource/2001/updating-dhtml-web-pages/

Using Web Standards in Your Web Pages
http://www.mozilla.org/docs/web-developer/upgrade_2.html

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top