Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto switch frames 1

Status
Not open for further replies.

dwlerwill

Technical User
May 25, 2001
329
Hi all

I have a simple reports system that I made for work. What they want now is the report shown constantly on a projector so they need 2 reports to switch between themselves every 60 seconds. I have a setup like this.

Two seperate reports each with a main frame that refreshs the child frame every 60 seconds (All in basic HTML)

I have the following code on my frame.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Dave's Report System</title>
<META HTTP-EQUIV=REFRESH CONTENT="30">
</head>

<frameset rows="*,541" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="Reports.htm" name="mainFrame">
<frame src="NB2.htm" name="bottomFrame" scrolling="YES" noresize>
</frameset>
<noframes><body>
</body></noframes>
</html>

how can I edit this so frame src="NB2.htm" name="bottomFrame" scrolling="YES" noresize> changes to frame src="NB1.htm" name="bottomFrame" scrolling="YES" noresize>
(Different file name) automatically every 60 seconds. Hope this makes sence.

David Lerwill
&quot;If at first you don't succeed go to the pub&quot;
 
try some simple Javascript to look at the current source of the Frame and then toggle it.

e.g. :

if (document.bottomFrame.location=='NB1.htm')
{
document.bottomFrame.location=='NB2.htm';
}
else
{
document.bottomFrame.location=='NB1.htm';
}
 
Thank you

David Lerwill
&quot;If at first you don't succeed go to the pub&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top