Current location: Hot Scripts Forums » General Web Coding » CSS » I am confused with the IE bug...


I am confused with the IE bug...

Reply
  #1 (permalink)  
Old 08-11-05, 02:39 AM
thegametb thegametb is offline
New Member
 
Join Date: Aug 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
I am confused with the IE bug...

I don't remember where I got this code at last year, but along with the CSS nested list example, they had the IE workaround for it to show up correctly. It basically works if you want only one drop-down menu, but I need an IE workaround to give me more freedom. The script works perfectly in Firefox, so the scripting is correctly done. Also the script will work if I only use one unordered list in IE. Here is the java workaround to get one dropdown to work:

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("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;


My stupid test was just changing the navRoot = document.getElementById("nav"); to nav2 which would basically void nav and work only with nav2. I figured that would be the more logical method to change for the script to work with IE, but it didn't. I have a feeling that it may be a simple problem, but being a beginner I cannot find it.

PS: This could go either here or in a JavaScript section, but I figured that it would be easier to understand the problem here.

Thanks for any help or advice given.
Reply With Quote
  #2 (permalink)  
Old 08-11-05, 06:04 PM
thegametb thegametb is offline
New Member
 
Join Date: Aug 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Solved my own problem. I ended up getting a Godsend by finding the site I got the stuff from.... http://www.alistapart.com/articles/dropdowns/ and the reason why it was not working was my coding. I was coding things slightly off by creating individual unordered lists rather than one unordered list containing all of the navigation. The JavaScript works correctly, but my scripting in the pages were incorrect.

LoL, At the time of finding the script, I totalled *****d it up in my coding and somehow screwed it up. Basically when I did the coding for my portfolio website, I only needed one drop-down menu, so instead of smartly putting the whole navigation in an unordered list, I just did the specific link that needed the drop-down.

What I had to do to get it working correctly with multiple drop-down menus were to do it the correct way... create everything in the navigation under one unordered list and display all the links within the lists. So the admins can close this post if they desire to as it's been solved.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crazy bug - going back in time kailash HotScripts Site Bug Reports 3 06-15-05 01:05 PM
mod_rewrite strange bug( Dimka PHP 1 12-17-04 12:54 AM
confused what prog lang is applicable.pls help... virmachscrew Script Requests 0 12-12-04 08:04 PM
Visual Basic 6 bug? whoknow Visual Basic 1 08-27-04 06:53 PM
bug tracking - flatend russell_writer Script Requests 0 04-19-04 06:14 AM


All times are GMT -5. The time now is 01:41 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.