• Resolved robpannell

    (@robpannell)


    Having upgraded from wordpress 3.1 to 3.2 the javascript navigation bar in the header no longer functions in IE. the menus don’t drop down when you rollover them.

    It must be to do with changes in WP, as I’ve since downgraded back to 3.1 and it operates fine again.

    I’d love for this to be fixed (or learn of a fix I can apply myself) so I can run the newer WP.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi robpannell,

    I think I’ve been able to solve this problem and it seems to be a problem with the javascript located in menu.js

    I managed to trace the entire script to work out how it works and it is related to some code on lines around 181-8. I’m assuming what this code does is to work out when the document has been loaded by inserting a snippet into the head of the document and waiting for it to be rendered (setting the readyState of the element to ‘complete’).

    Eventually, after a few attempts the readystate is finally set to ‘complete’ and loadMenus() is called (lines 150-76). On line 163 the script attempts to get the menubar and load all the menus associated with it. The only problem I’ve encountered is that document.getElementById(‘menu’) returns null which leads me to believe that it hasn’t been rendered yet.

    To wait until the menu has been rendered I waited for the document’s readyState to be set as complete and then called loadMenus();

    Original Code (lines 182-88):

    document.write('<script id="__ie_onload_for_inove" defer src="javascript:void(0)"></script>');
    	var script = document.getElementById('__ie_onload_for_inove');
    	script.onreadystatechange = function() {
    		if (script.readyState == 'complete') {
    			loadMenus();
    		}
    	}

    New Code:

    //document.write('<script id="__ie_onload_for_inove" defer src="javascript:void(0)"></script>');
    	//var script = document.getElementById('__ie_onload_for_inove');
    	document.onreadystatechange = function() {
    		if (document.readyState == 'complete') {
    			loadMenus();
    		}
    	}

    Cheers,

    Sam

    Thread Starter robpannell

    (@robpannell)

    I finally found time to give this a shot.
    It’s fantastic, worked a treat.

    Thank you!

    Thanks Sam… been frustrated by this one..

    You are awesome!!

    Thank you

    Thanks a lot, You saved my time 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Inove menu not compatible with WP 3.2’ is closed to new replies.