View Full Version : All Levels Navigational Menu url issue on Internet Explorer 7

09-26-2008, 01:18 AM
1) All Levels Navigational Menu

2) http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm

3) I have installed the menu onto a clients website, and all seemed well, I tested it out on several machines of my own and it all worked well on all browsers.

After implementation I got a report back detailing that several of the machines used within my clients company would take an extremely long time to load any of the links within the new menu. One other computer was also displaying white space where the iframes appeared.

I solved the iframe issue by adding this line to the javascript for the function addshimmy:function(target){:

shim.setAttribute("allowTransparency", "true")

The issue with the links not loading perplexed me as I couldn't seem to find an obvious cause, the menu was working at several other machines I've tested, but none of the machines within the company. I ended up testing the exact sample code uploaded to the servers, and that worked fine, the problem occurred when I specified a link that pointed to somewhere within the same directory on the website.

To confirm this I made a basic version of the menu hosted inside a folder outside of the main directory, with this menu all the links went straight to their destination. Using the exact same code in the main directory, the links took forever to load, say 20 mins, links to other websites were working fine.

Here are links to the two demo pages, they will probably work fine for everyone but I don't know what would cause these computers to have problems handling the code:

www dot dresscircle dot co dot uk/demo.htm (non working page)

www dot dresscircle dot co dot uk/ddlevelsmenu/demo.htm(working page that is within a directory outside of the main)

The computer I've been encountering the problems with uses IE7 Version 7.0.5730.11. I've tested the same code using firefox on the same computer with no issues. I've checked the computers are up to date with all their software updates SP3 and everything. If anyone has had similar issues please let me know.

Any advice is much appreciated.

09-27-2008, 07:15 AM
if you disable the script and CSS altogether on the test page, so the menu simply renders as a regular list on the page, does clicking on the links still exhibit the same stalling behavior? As you may have guessed, testing that page as is in IE7 works fine for me- the links do take a noticeable 2-3 seconds to load, but normal enough for dynamic pages.

09-27-2008, 07:32 PM
Hi Admin,

I have removed all CSS and javascript and all the links reach their destinations with no 'hang' problem, it seems that the links seem to hang when the menu is enabled, which leads me to believe something in the javascript is not liking these particular computers, however I'd rather put it on the site knowing that other people wouldn't encounter the same problem. It could have something to do with that this computer handles the javascript differently, the line I had to add appears to be there for Opera, however this computer is using IE.

Don't know if that helps.

09-27-2008, 10:38 PM
Hmm it's certainly a wild one. The only thing that happens when you click on the menu links as far as the script is concerned is that it closes the drop down menu at that time. Perhaps try disabling this behavior, and see if that changes anything. Find the two chunks code code below inside the .js file, and comment them out:

if (istoplevel){
this.addEvent(header, function(e){
}, "click")


//this.addEvent(dropul, function(){ddlevelsmenu.hidemenu(this)}, "click")

09-29-2008, 01:11 AM
Thanks admin,

Unfortunately I made the changes and they didn't have any effect on the code.

I've still not found the cause of the problem but here's what happens on some occasions, with all browsers closed I open up IE and open up the demo page, then I use the menu to select a link and click it, the page will hang for several minutes, perhaps 20-30 minutes until it displays the message:
'Internet Explorer cannot display the webpage'

Then (sometimes) when refreshing the page the code works as it should and when I enable it on the main site it works there too, I can't pinpoint yet what has let the code run as it should, if I close the browser and reopen it and the problem returns.

On a side note, I also had to amend the httpsiframesrc value in the javascript to a http address:

httpsiframesrc: "http://www dot dresscircle dot co dot uk/index.htm",

and amend this to http:
shim.setAttribute("src", location.protocol=="http:"? this.httpsiframesrc : "about:blank")

only then would this particular computer display the iframes transparently.

Very weird, the site is in trusted sites and with the css included the page works, it's definetly something in the javascript that throws the browser into a wobbly.

I've enabled it on the main site if you want to see if you get any problems there:
http://www dot dresscircle dot co dot uk/


10-01-2008, 01:24 PM
Hi Admin,

It seems the menu only works on the main pages when the two sections of code you have mentioned are disabled, however there is a very long delay of 20 - 30 minutes before the page loads, once the first page has loaded, the menu appears to work fine until closing and reopening the browser.

10-01-2008, 09:46 PM
Hmm at this point I'm debugging in the dark so the speak, since I'm not experiencing the long delay you're talking about when clicking on the drop down menus' links. Taking a step back though, will all your drop down menus be only 1 level deep, as they currently are on your page? If so, you can try switching to a more simplistic, one level drop down menu such as this one (http://www.dynamicdrive.com/dynamicindex1/droptabmenu.htm), and see if the problems go away.

10-08-2008, 02:15 PM
Hi Admin,

I've put in that other code and the site is working perfectly on the previously problematic computers, I have had to change some things such as build two new images to get around the fact that each tab was previously a different image.

Very strange, I think possibly it was an iframe issue, but I'm not going to be spending any more time trying to troubleshoot it now.

Thanks again for your help.