Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-21-2009, 08:32 AM   PM User | #1
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
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 ?
BubikolRamios is offline   Reply With Quote
Old 01-21-2009, 07:43 PM   PM User | #2
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
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..
BubikolRamios is offline   Reply With Quote
Old 01-21-2009, 08:05 PM   PM User | #3
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
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 ?
BubikolRamios is offline   Reply With Quote
Old 01-21-2009, 08:39 PM   PM User | #4
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
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>
BubikolRamios is offline   Reply With Quote
Old 10-13-2009, 11:21 AM   PM User | #5
nikos101
Senior Coder

 
nikos101's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 1,004
Thanks: 58
Thanked 10 Times in 10 Posts
nikos101 is an unknown quantity at this point
I've really not seen to much benefit from using

ie7-js

what good is it really?
__________________

nikos101 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:58 AM.


Advertisement
Log in to turn off these ads.