Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,960
    Thanks
    120
    Thanked 76 Times in 76 Posts

    IE7.js, IE8.js Iframe

    does not work in iframe, the error described here:

    http://groups.google.com/group/ie7-j...73a3e?lnk=raot

    if I do correction as suggested then the error dissapears, but does not work (hover).

    Anyone found solution for that ?

  • #2
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,960
    Thanks
    120
    Thanked 76 Times in 76 Posts
    ivestigated it(ie6):
    Code:
    <!DOCTYPE html PUBLIC
    "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    
    <html id = 'html' ...
      <body id = 'body' ....
    Code:
     alert(document.documentElement.getAttribute('id'));// returns htmlElement
     alert(document.documentElement.getElementsByTagName('body')[0].getAttribute('id'));
    this 2 lines works fine runned inside main page, inside iframe the first line is ok, the second line
    is null or not an object ?
    Last edited by BubikolRamios; 01-21-2009 at 07:46 PM.

  • #3
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,960
    Thanks
    120
    Thanked 76 Times in 76 Posts
    in short:

    Code:
      document.documentElement;//returns htmlElement
      document.documentElement.childNodes.length//is 1 short at iframe (IE6)
    and that one is exactly body element, it captures head element and then there is nothing more.

    any suggestion ?

  • #4
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,960
    Thanks
    120
    Thanked 76 Times in 76 Posts
    the solution is to put this there (in case of iframe) ! Not on top as you would like, as it seems in iframe body gets created somehow later.

    Code:
    ...      
           <!--[if lt IE 8]>
             <script src="../js/IE8.js" type="text/javascript"></script>
           <![endif]--> 
        
      </body>
    </html>

  • #5
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,005
    Thanks
    58
    Thanked 10 Times in 10 Posts
    I've really not seen to much benefit from using

    ie7-js

    what good is it really?



  •  

    Posting Permissions

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