Results 1 to 4 of 4

Thread: AnyLink JS Drop Down Menu v2.0 works in Safari and Firefox but does not work in IE

  1. #1
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink JS Drop Down Menu v2.0 works in Safari and Firefox but does not work in IE

    1) Script Title: AnyLink JS Drop Down Menu v2.2

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem:
    This menu works fine in Safari and Firefox but not in IE. The menu at the top of the page should have the drop down effect. Any help would be appreciated. Page is posted here:

    http://www.alpinism.com/New/index.html

    Pertinent files are attached
    Last edited by corax; 11-11-2010 at 02:17 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The file alpinism.com/New/anylinkmenu.js has an added line break in it:

    Code:
    domready:function(functionref){ //based on code from the jQuery library
    	if (dd_domreadycheck){
    		functionref()
    		return
    	}
    	// Mozilla, Opera and webkit nightlies currently support this event
    	if (document.addEventListener) {
    		// Use the handy event callback
    		document.addEventListener("DOMContentLoaded", function(){
    			document.removeEventListener("DOMContentLoaded", arguments.callee, false )
    			functionref();
    			dd_domreadycheck=true
    		}, false )
    	}
    	else if (document.attachEvent){
    		// If IE and not an iframe
    		// continually check to see if the document is ready
    		if ( document.documentElement.doScroll && window == window.top) (function(){
    			if (dd_domreadycheck) return
    			try{
    				// If IE is used, use the trick by Diego Perini
    				// http://javascrip
    t.nwbox.com/IEContentLoaded/
    				document.documentElement.doScroll("left")
    			}catch(error){
    				setTimeout( arguments.callee, 0)
    				return;
    			}
    			//and execute any wai . . .
    should be:

    Code:
    domready:function(functionref){ //based on code from the jQuery library
    	if (dd_domreadycheck){
    		functionref()
    		return
    	}
    	// Mozilla, Opera and webkit nightlies currently support this event
    	if (document.addEventListener) {
    		// Use the handy event callback
    		document.addEventListener("DOMContentLoaded", function(){
    			document.removeEventListener("DOMContentLoaded", arguments.callee, false )
    			functionref();
    			dd_domreadycheck=true
    		}, false )
    	}
    	else if (document.attachEvent){
    		// If IE and not an iframe
    		// continually check to see if the document is ready
    		if ( document.documentElement.doScroll && window == window.top) (function(){
    			if (dd_domreadycheck) return
    			try{
    				// If IE is used, use the trick by Diego Perini
    				// http://javascript.nwbox.com/IEContentLoaded/
    				document.documentElement.doScroll("left")
    			}catch(error){
    				setTimeout( arguments.callee, 0)
    				return;
    			}
    			//and execute any wai . . .
    Either correct that, or replace the file with a fresh copy from the demo page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks John.

    Strangely the code is correct in the files on my hard drive but when I upload them to the server the code error shows up. I've uploaded all the .html .css and .js files to the server again with no luck. So tried replacing the code from the demo page onto the files on my hard drive and uploading all files again, with no luck. Tried editing the code and replacing the code on the file on the server with no luck.

    Note that after all this I haven't been able to check compatibility with IE as I have to go downtown to check it out on a PC and haven't had time to do so this morning. I've just been opening the file on the server after trying the fixes and the error still shows.

    I will be able to fiddle with this more tonight but at this point I'm stumped. Any ideas?

    Thanks.

    A few minutes later: I realize that the animatedcollapse.js file is getting corrupted on upload too, in a similar manner. This file was also take from the Dynamic Drive site. This js seems to be working OK in IE though, although not as completely smoothly as it could.

    Thanks, Mark
    Last edited by corax; 11-11-2010 at 04:22 PM.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Make sure that when uploading the correct anylinkmenu.js file that you are indeed doing it to the correct location on the server. Delete the bad one first to prevent the new one from becoming named slightly differently by the server or your upload client (unusual, but could happen). Use an ftp program, not some component of your editor or your host's online interface. Either of those two might alter the file.

    Navigate directly to the file in Firefox and refresh to see if the change has taken affect.

    If so, clear the cache in IE before viewing the page and while the page isn't open in any window or tab of IE. Then navigate to the page and hit refresh.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •