Advanced Search

Results 1 to 2 of 2

Thread: Any Link CSS doesn't work with IE 10 in an iframe.

  1. #1
    Join Date
    May 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Any Link CSS doesn't work with IE 10 in an iframe.

    1) Script Title: AnyLink CSS Menu v2.3

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

    3) Describe problem:
    The script does not work correctly in Internet Explorer in an iframe. When in an iframe the menu disappears as soon as you hover over it.

    Example:
    http://growingcheerfulgivers.com/test.html (demo script, works fine)
    http://growingcheerfulgivers.com/testiframe.html (simple page that only has 1 iframe on it that includes the test.html page), doesn't work.

    Is this a bug, or am I doing something wrong? Deep in the JS code I notice some conditional checks for IE and iframes, and I wonder if that is the problem?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,702
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    Using a text only editor like NotePad, find these lines in the script:

    Code:
    	if (document.attachEvent && parent.length>0) //account for page being in IFRAME, in which above doesn't fire in IE
    		this.addEvent([window], function(){functionref()}, "load");
    Make it like so (additions red, line may wrap):

    Code:
    	if (!window.addEventListener && document.attachEvent && parent.length>0) //account for page being in IFRAME, in which above doesn't fire in IE 8 and less
    		this.addEvent([window], function(){functionref()}, "load");
    Save and use that version.

    The browser cache may need to be cleared and/or the page refreshed to see changes.
    - John
    ________________________

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

Similar Threads

  1. Any Link CSS doesn't work with IE 10 in an iframe.
    By erick4x4 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-20-2013, 04:13 PM
  2. Can't seem to get the iframe to work.
    By Lady Rogue in forum HTML
    Replies: 3
    Last Post: 01-09-2013, 12:45 AM
  3. a:link rule won't work on a link tag
    By mdisch in forum CSS
    Replies: 8
    Last Post: 08-27-2008, 07:27 PM
  4. IFRAME (Iframe SSI script II) does not work on IE7
    By penny1jordan23 in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 08-08-2007, 09:49 PM
  5. Replies: 0
    Last Post: 06-16-2005, 03:16 AM

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
  •