473,385 Members | 1,597 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,385 software developers and data experts.

javascript not working in IE 6 for drop down menu, why?

Does anyone have an idea as to why the js does not work on the
horizontal drop down menu in IE 6? I have pretty much used exactly what
A List had posted in their article titled, "Drop-down Menus Horizontal
Style."

Any advice?
Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
body {min-width:825px}/* for mozilla and good browsers*/
</style>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>test.</title>
<script type="text/javascript">
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("frn_nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace
(" over", "");
}
}
}
}
}
window.onload=startList;
</script>
<link href="inc/2-COL-SLIDING_III.css" rel="stylesheet" type="text/css"
/>

<link href="inc/drop_down_menu.css" rel="stylesheet" type="text/css" />
</head>
<body>
<cfinclude template="inc/top_nav_left_nav.cfm">
<div id="frn_nav">
<ul id="frn_nav">
<li><a href="#">Home</a></li>
<li><a href="#">About</a>
<ul>
<li><a href="#">History</a></li>
<li><a href="#">Team</a></li>
<li><a href="#">Offices</a></li>
</ul>
</li>
<li><a href="#">Services</a>
<ul>
<li><a href="#">Web Design</a></li>
<li><a href="#">Internet
Marketing</a></li>
<li><a href="#">Hosting</a></li>
<li><a href="#">Domain Names</a></li>
<li><a href="#">Broadband</a></li>
</ul>
</li>
<li><a href="#">Contact Us</a>
<ul>
<li><a href="#">United Kingdom</a></li>
<li><a href="#">France</a></li>
<li><a href="#">USA</a></li>
<li><a href="#">Australia</a></li>
</ul>
</li>
</ul>
</div>
<cfinclude template="inc/bottom.cfm">

Jul 7 '06 #1
1 1752

to**@itzagalerias.com wrote:
Does anyone have an idea as to why the js does not work on the
horizontal drop down menu in IE 6? I have pretty much used exactly what
A List had posted in their article titled, "Drop-down Menus Horizontal
Style."
<snip>
<style>
body {min-width:825px}/* for mozilla and good browsers*/
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>test.</title>
<script type="text/javascript">
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("frn_nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace
(" over", "");
}
}
}
}
}
window.onload=startList;
</script>
I would guess that Opera would handle the style correctly. In the
script that follows the style you are testing for both document.all and
document.getElementById support and then doing something if both are
supported. Not only IE, but also Opera supports both document.all and
document.getElementById. It will be interesting to see how Opera
responds, as it likely will attempt to support both the style and what
you do in the script just after the test.

It would be much more easy to see what is going on if you supplied a
test page. Perhaps someone else works with this sort of thing all of
the time and will at once see what is going on from your posted code
without having to try various modifications.

Jul 7 '06 #2

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

Similar topics

53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
9
by: Harry | last post by:
I am accumulating over 80 pages per day into an archive that I will need to be able to present sequentially to viewers. Using html to viewing a page, then click on back to return to my archive...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
2
by: pantagruel | last post by:
I have an old web application I did where browsers with dynamic capabilities received a drop down menu on the top of the page and a fold out on the left hand side of the page and non-dynamic...
13
by: Eric Robinson | last post by:
Hello, My ASP code creates an ADO recordset object on the server. Later on the same page, I have a javascript code snippet that I use to dynamically populate a drop-down box based on choices...
4
by: simon.cigoj | last post by:
I have an javascript made menu and some forms with the dropdown element. When the menu opens and scrolls down the drop down is displeyed over the menu and obscures the menu choices. I have this...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
6
by: nishac | last post by:
Can anyone suggest me how to make my drop down menu work in IE7 too.Its working in other browsers.On mouse over the submenus should be displayed.Am attaching my css code hereby.Anyone please check...
6
by: marckatsambis | last post by:
Hi, Apologies in advance if this seems long winded and confusing... I'm trying to make a javascript drop down menu work around multiple iframes. The initial page...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.