Cross-frame - Works in FF, Fails in IE

A

ashore

The JS is
parent.top.document.getElementById('level').innerHTML="whatever";

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

-AS
 
A

ashore

I shudda mentioned the frame structure. It's:

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

Thomas 'PointedEars' Lahn

ashore said:
parent.top.document.getElementById('level').innerHTML="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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top