Jump to content

[SOLVED] Frames Issue


anujgarg

Recommended Posts

Hi,

 

I am using 2 frames with timer (framename=timer) in first frame and quiz (framename=quiz) in another. The thing is that when the timer is up, I want to redirect the quiz frame from the timer frame. What I am using is this (the javascript):

 

in quiz frame:

 

function reload1()

{

window.location = "http://www.google.com";

}

 

and

in timer frame:

 

function redir()

{

alert("Time Up");

parent.quiz.reload1();

}

 

The error message I am getting is:

parent.quiz.reload1 is not a function.

 

Any help would be highly appreciated.

 

TIA

Link to comment
https://forums.phpfreaks.com/topic/78526-solved-frames-issue/
Share on other sites

put both of your functions in an external js and then embed the external js into the page you will be displaying in your "time frame".

 

make your external js like this:

 

var next="http://www.google.com";
function reload1()
{
window.location.href = next;
}
function redir()
{
alert("Time Up");
parent.quiz.location.href = next;
}

 

but this really does not belong in this forum; it belongs here:

 

http://www.phpfreaks.com/forums/index.php/board,6.0.html

 

Link to comment
https://forums.phpfreaks.com/topic/78526-solved-frames-issue/#findComment-397408
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.