We help IT Professionals succeed at work.

auto refresh frame

loyaliser
loyaliser asked
on
i have this code in the html page for the top frame:

<script language="JavaScript">
<!--
function reloadFrame() {
     parent.frames[1].location.reload();
}
setTimeout("reloadFrame(1)", 10);
//-->
</script>

what it is supposed to do is refresh the bottom frame every 10 seconds.

i am running IE 6.0, and i keep getting a javascript error saying PERMISSION DENIED or ACCESS DENIED.

what's the deal? is it not possible to refresh a another frame every 10 seconds from another frame?

thanks...
Comment
Watch Question

Author

Commented:
oops, the code should be:

<script language="JavaScript">
<!--
function reloadFrame() {
     parent.frames[1].location.reload();
}
setTimeout("reloadFrame()", 10);
//-->
</script>
Top Expert 2013

Commented:
You must be trying to refresh cross-domain.  That creates a security problem.  You cannot script across domains.

Cd&

Author

Commented:
yes, i am actually... the pages i created with the script load up another web site's page in another frame.

so this is a problem? it cannot be done in javascript, vbscript at all?

thanks.
Top Expert 2013
Commented:
No.  It is purely a security issues.  If such a thing was allowed then content could be stolen and manipulated without the owners authorization.  Many sites will not even let you load their pages into a frame.

Cd&
Top Expert 2013

Commented:
Sorry there was no real solution for you.  Thanks for the A. :^)

Cd&

Explore More ContentExplore courses, solutions, and other research materials related to this topic.