473,413 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

IE5 + ok, netscape 7.1 no workie

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[i];
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[i]+"</TD></TR>"; }
else { this.info += "<LAYER onMouseOver='this.bgColor=\""+hovercolor+"\"'
onMouseOut='this.bgColor=\""+bgcolor+"\"' WIDTH="+Width+" POSITION=RELATIVE
TOP="+T+">&nbsp;"+arguments[i]+"</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[i].top+"; left:"+Layer[i].left+";'><TABLE STYLE='border:solid
"+menu_border+" "+border_color+"'>"+Layer[i].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[i].top+"
LEFT="+Layer[i].left+">"+Layer[i].info+"</LAYER>"); }
}

if(document.all) { document.all["menubar"].style.visibility = "visible"; }
else if(document.layers) { document.layers["menubar"].visibility =
"visible"; }

// -->
</SCRIPT>

</BODY>
</HTML>


Jul 20 '05 #1
2 1806
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

Adrian wrote:
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[i];
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[i]+"</TD></TR>"; }
else { this.info += "<LAYER onMouseOver='this.bgColor=\""+hovercolor+"\"'
onMouseOut='this.bgColor=\""+bgcolor+"\"' WIDTH="+Width+" POSITION=RELATIVE
TOP="+T+">&nbsp;"+arguments[i]+"</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[i].top+"; left:"+Layer[i].left+";'><TABLE STYLE='border:solid
"+menu_border+" "+border_color+"'>"+Layer[i].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[i].top+"
LEFT="+Layer[i].left+">"+Layer[i].info+"</LAYER>"); }
}

if(document.all) { document.all["menubar"].style.visibility = "visible"; }
else if(document.layers) { document.layers["menubar"].visibility =
"visible"; }

// -->
</SCRIPT>

</BODY>
</HTML>



Jul 20 '05 #2
DU
Adrian wrote:
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[i];
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[i]+"</TD></TR>"; }
else { this.info += "<LAYER onMouseOver='this.bgColor=\""+hovercolor+"\"'
onMouseOut='this.bgColor=\""+bgcolor+"\"' WIDTH="+Width+" POSITION=RELATIVE
TOP="+T+">&nbsp;"+arguments[i]+"</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[i].top+"; left:"+Layer[i].left+";'><TABLE STYLE='border:solid
"+menu_border+" "+border_color+"'>"+Layer[i].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[i].top+"
LEFT="+Layer[i].left+">"+Layer[i].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/viewsour...tml-web-pages/

Using Web Standards in Your Web Pages
http://www.mozilla.org/docs/web-deve...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/doctorunc...e7Section.html

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if...
1
by: mark.reichman | last post by:
First off.. Thanks to Grant Wagner for help in a previous thread related to this one. I am at a total loss... I have multiple fields in a form with the same name. Lets call the fields with the...
9
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to...
2
by: SabMan | last post by:
I understand that document.layers is no longer supported in Netscape 7.1 but I am not sure on how to fix the code so that it will work with Netscape 7.1. I understand that document.all is no...
26
by: Roger Desparois | last post by:
Hi, I need help : I found the simplest and most precise way to open and close submenu layers. it works perfectly with IE, but for some odd reason NS won't recognize it. Can anyone tell me why...
6
by: qqq | last post by:
I'm a relative newbie... I'd like my site to support Netscape browsers. For a page I set 'TargetSchema' to 'IE 3.02/Netscape 3'. When I insert label or textbox web controls on the page, they...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
4
by: Nathan Sokalski | last post by:
I was testing out a page of mine that displays the information from Page.Request.Browser. It works exactly as I expected in Internet Explorer and Netscape 4.75 (I didn't expect much in Netscape...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.