compatability issue

P

Phillip Parr

This is a repost, as no one could/decided to help me, and it's still a
problem I have!

I'm having a little problem which is bound to be simple to solve but I just
can't find the answer.

I have a file containing...

<iframe name="submitWindow" src="dochat.php"></iframe>
<iframe name="refreshWindow" src="chatupdate.php"></iframe>

and a section from the dochat.php file...

parent.document.refreshWindow.location.reload();


So basically, the structure is i'm using a page in an iframe to reload a
page in another iframe which both have the same parent. This code works fine
in MSIE but I get the following error in netscape:

Error: parent.document.refreshWindow has no properties
Source File: dochat.php
Line: 9

If anyone can tell me what I need to do to make it work in netscape I'd be
very happy!

Thanks in advance :)
 
M

Martin Honnen

Phillip Parr wrote:

<iframe name="submitWindow" src="dochat.php"></iframe>
<iframe name="refreshWindow" src="chatupdate.php"></iframe>

and a section from the dochat.php file...

parent.document.refreshWindow.location.reload();

Error: parent.document.refreshWindow has no properties
Source File: dochat.php
Line: 9

Use
if (parent.frames && parent.frames.refreshWindow) {
parent.frames.refreshWindow.location.reload();
}
that should work in both browsers, frames are accessible via the frames
collection.
 

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

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top