You are here: irt.org | FAQ | JavaScript | Frame | Q971 [ previous next ]
If the pages are your pages, i.e. all on the same server, then you could monitor the other frame using:
In the frameset page:
<html> <head> <script language="JavaScript"><!-- var lastUrl = ''; function doSomething() { // do something } function monitor() { if (lastUrl != window.frame1.location.href) { lastUrl = window.frame1.location.href); doSomething(); } setTimeout('monitor()',1000); } function startToMonitor() { lastUrl = window.frame1.location.href; } //--></script> </head> <frameset rows="50%,*" onLoad="startToMonitor()"> <frame src="page1.htm" name="frame0"> <frame src="page2.htm" name="frame1"> </frameset> </html>