Jump to content

Drop Down Menu Didn't Work In IE7


ArahMan7

Recommended Posts

I don't see the menu you're referring to, it's actually a little difficult to find anything on that site with all the ads around.
Sorry for the mess. The said drop down menu are located at the very bottom of both sidebar. On the right sidebar there are only three main menu, My Sacred Links, Recovery Links and Non-Recovery Links.On the left sidebar, there are six main menu, Wish Lists, Link Goodies, Directory, Statistics, Previous Posts and Archive. I hope you can find them.Greeting from Malaysia.
Link to comment
Share on other sites

The Javascript code is pretty basic, it's not really doing anything strange that IE would have a problem with. I don't have IE7 though, so I can't test it on that. Check whatever Javascript debugging IE7 has to try to find an error message, if the Javascript is failing there will be an error message somewhere.

Link to comment
Share on other sites

The Javascript code is pretty basic, it's not really doing anything strange that IE would have a problem with. I don't have IE7 though, so I can't test it on that. Check whatever Javascript debugging IE7 has to try to find an error message, if the Javascript is failing there will be an error message somewhere.
Thanks. Do you mean to say it is alright other than IE7? Yes, it is good news I say, coz not many of my readers are using IE7. I'm relieve to hear that. I that is so, I can live with it.Sorry, I'm not as savvy at computer as you like to think, but how do you check javascripts debugging? One more thing, it seem IE7 are not good. How do you revert back to IE6?Greeting from Malaysia.
Link to comment
Share on other sites

Browsers have a way to check for Javascript error messages. With IE6, there was a little yellow "caution" icon down in the lower left that you could double click on if there were errors. Opera has a much better error console to show error messages and Firefox I believe has a dedicated Javascript console to show them. I'm not sure what they did in IE7.If you want to uninstall IE7 you can go to the Add/Remove Programs list and find it there, it is listed under "Windows Internet Explorer" I believe. More info here:http://support.microsoft.com/kb/927177

Link to comment
Share on other sites

Browsers have a way to check for Javascript error messages. With IE6, there was a little yellow "caution" icon down in the lower left that you could double click on if there were errors. Opera has a much better error console to show error messages and Firefox I believe has a dedicated Javascript console to show them. I'm not sure what they did in IE7.If you want to uninstall IE7 you can go to the Add/Remove Programs list and find it there, it is listed under "Windows Internet Explorer" I believe. More info here:http://support.microsoft.com/kb/927177
Thank you JustSomeGuy for the head-up. Like I said, if it is only IE7 that's having problem with this Drop Down menu, I can live with that.Can you please do me a favour? If ever you get your hands on any IE7, please do a test for me. I just wanna make sure whether IE7 is the only culprit involve? Or is there any code that I can use to overcome the said problem? Or you can recommend any drop down menu that's compatible to all browsers?I gotta use drop down menu coz my sidebars are getting longer and longer and I prefer to use one post per page.Thank you again for the head-up. Really appreciate it.
Link to comment
Share on other sites

Holy crap, they fixed the line numbering in IE7. Thanks for the help jah-dev.

var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change

I'm not sure why it has a problem with that. That line is from this function:

function SwitchMenu(obj){	if(document.getElementById){	var el = document.getElementById(obj);	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change		if(el.style.display != "block"){ //DynamicDrive.com change			for (var i=0; i<ar.length; i++){				if (ar[i].className=="submenu") //DynamicDrive.com change				ar[i].style.display = "none";			}			el.style.display = "block";		}else{			el.style.display = "none";		}	}}

Maybe try changing it to this:

function SwitchMenu(obj){  if(document.getElementById){  var el = document.getElementById(obj);  var ar = document.getElementById("masterdiv");  ar = ar.getElementsByTagName("span");	if(el.style.display != "block"){ //DynamicDrive.com change	  for (var i=0; i<ar.length; i++){		if (ar[i].className=="submenu") //DynamicDrive.com change		ar[i].style.display = "none";	  }	  el.style.display = "block";	}else{	  el.style.display = "none";	}  }}

Link to comment
Share on other sites

I was just able to get the same error in Firefox by clicking on one of the menus before the page was fully loaded.

document.getElementById("masterdiv") has no propertiesLine 383
It looks like document.getElementById("masterdiv") is being executed before the <div id="masterdiv"> is rendered by the browser when someone clicks on one of those links before the page has loaded completely.
Link to comment
Share on other sites

It looks like document.getElementById("masterdiv") is being executed before the <div id="masterdiv"> is rendered by the browser when someone clicks on one of those links before the page has loaded completely.
That's odd, those links are in that element. Maybe unless it gets the closing tag, it doesn't put it in the DOM.Of course, there are probably other issues at work here. A quick glance over the validator shows a cool 427 errors:http://validator.w3.org/check?uri=http://a...7.blogspot.com/It's probably not helping that the page is being served as XHTML strict. That right there might be messing up the DOM in IE7, there are a ton of "invalid div" errors reported for XHTML strict. If this were something a little more lenient like HTML transitional then IE7 might be able to construct the DOM correctly, but as it is I can't say why IE6 is able to find the element when IE7 is not.
Link to comment
Share on other sites

this is kinda off topic/ on same subject however there is way too much going on with this blog. i really do not know where to look...i was studying your blog stats if there correct 5804 visitors since dec 12th, 2006 how long do these visitors stay on the site?A bif of positive criticism categorise your most important stuff and get rid of stuff thats not so important. heres a start, do you really need 37 links to different blogs?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...