Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Cross-frame - Works in FF, Fails in IE

Reply
Thread Tools

Cross-frame - Works in FF, Fails in IE

 
 
ashore
Guest
Posts: n/a
 
      08-04-2007
The JS is
parent.top.document.getElementById('level').innerH TML="whatever";

IE complains "... is null or not an object". Works fine in Firefox.
Any insights will be appreciated.

-AS

 
Reply With Quote
 
 
 
 
ashore
Guest
Posts: n/a
 
      08-04-2007
I shudda mentioned the frame structure. It's:

<FRAME SRC="top.php" NAME="top" SCROLLING="no">
<FRAME SRC="main.php" NAME="main">
-AS


 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      08-04-2007
ashore wrote:
> parent.top.document.getElementById('level').innerH TML="whatever";


parent.top contains redundancy.

> IE complains "... is null or not an object".


You are mixing a DOM standard (W3C DOM Level 2) and a proprietary
implementation (innerHTML) which is known to be error-prone if untested.
Depending on the IE version, document.getElementById() may not even be
supported.

Furthermore, if this is to be cross-frame, the reference to the target
frame is missing:

... window.top.frames["otherframe"].document ...

> Works fine in Firefox.


That is highly unlikely. Firefox logs errors in the error console,
probably you will find the error message there.


HTH

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When I turn on my PC, it works, works, works. Problem! Fogar Computer Information 1 01-17-2006 12:57 AM
Constant.t fails 240 of 272 tests and recurs.t fails 1 of 25 tests on HPUX using perl 5.8.7 dayo Perl Misc 11 12-16-2005 09:09 PM
slideshow fails, Firefox debugger also fails lkrubner@geocities.com Javascript 2 12-23-2004 06:22 PM
After rebooting my PC works, works, works! Antivirus problem? Adriano Computer Information 1 12-15-2003 05:30 AM
Forms Authentication Fails Between ASP.NET 1.0 and 1.1 Applications (Cookie Decryption Fails) John Saunders ASP .Net 1 11-18-2003 03:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57