...

View Full Version : IE7.js, IE8.js Iframe



BubikolRamios
01-21-2009, 09:32 AM
does not work in iframe, the error described here:

http://groups.google.com/group/ie7-js/browse_thread/thread/bf36dd05db4c5862/93bf53246d173a3e?lnk=raot

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

Anyone found solution for that ?

BubikolRamios
01-21-2009, 08:43 PM
ivestigated it(ie6):


<!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' ....




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 ?

BubikolRamios
01-21-2009, 09:05 PM
in short:



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
01-21-2009, 09:39 PM
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.



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

</body>
</html>

nikos101
10-13-2009, 12:21 PM
I've really not seen to much benefit from using

ie7-js (http://code.google.com/p/ie7-js/)

what good is it really?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum