General discussion

Locked

Swapping Between Web Pages

By tim.williams ·
Hi there

I have got 2 web pages both which display company reports but for different topics in real time and automaticaaly refresh, we want them to be displayed on a plasma screen in the call centre,
my question is, does anyone know how I can enable them to swap every so ofter, for instance display 1 report for 2 mins then swap to the other for 2 mins and then back again on an endless loop?

Your help is much appreciated in this matter

Kind Regards

Tim

This conversation is currently closed to new comments.

10 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

double post

by Jaqui In reply to Swapping Between Web Page ...

fixed typos in the second one. :)

Collapse -

For Jaqui

by tim.williams In reply to double post

These are the two links

Could you write them into the code for me and set them to 2 mins as I dont know Java Script?

Do you open the code in a seperate browser to the other two pages?

http://catserver2/Reports1/Pages/Report.aspx?ItemPath=%2fCatalyst+reports%2fChris+hurcombe%2fDaily+Verbal+Statistics

http://catserver2/Reports1/Pages/Report.aspx?ItemPath=%2fCatalyst+reports%2fChris+hurcombe%2fCurrent+App+Reports

Thanks

Tim

Collapse -

here is a javascript

by Jaqui In reply to Swapping Between Web Page ...

designed to rotate links in a page.
alter the one minute timing and point it at each page instead of making it a link.

[pre]
<!-- LINK OF MINUTE:

Have a link that changes every minute

-->
<BODY>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var links = 5; // set this to the number of links you have below!
var date = new Date();
var rd = date.getMinutes();
var ra = rd % links;
var re = ++ra;
var url = "document.write(re)";
var text = "";
if (re == 1) {
url = " ";
text = " ";
}
if (re == 2) {
url = " ";
text = " ";
}
if (re == 3) {
url = " ";
text = " ";
}
if (re == 4) {
url = " ";
text = " ";
}
if (re == 5) {
url = " ";
text = " ";
}
var link="<A TARGET=\"_top\" HREF=\""+url+"\" onMouseOver=\"window.status='"+text+"'\">"+text+"</A>";
document.write(link);
// End -->
</SCRIPT>
[/pre]

Collapse -

Thanks Jaqui

by tim.williams In reply to here is a javascript

Thanks Jaqui for the reply,

Just 2 questions about the code,
where do I put the amount of minutes required?
Also
Do I run this page as a seperate page to the other two?

Thanks

Tim

Collapse -

here is the url's added...

by Jaqui In reply to Thanks Jaqui

as for the time, I pulled this script from a generator, I don't know javascript either.

this is the entire content of the web page, it will call the report page and display it, or should.
you only need to copy this into your html editor and save with whatever title you want.

[pre]
<!-- LINK OF MINUTE:

Have a link that changes every minute

-->
<BODY>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var links = 2; // set this to the number of links you have below!
var date = new Date();
var rd = date.getMinutes();
var ra = rd % links;
var re = ++ra;
var url = "document.write(re)";
var text = "";
if (re == 1) {
url = "http://catserver2/Reports1/Pages/Report.aspx?ItemPath=%2fCatalyst+reports%2fChris+hurcombe%2fDaily+Verbal+Statistics";
text = "Report one";
}
if (re == 2) {
url = "http://catserver2/Reports1/Pages/Report.aspx?ItemPath=%2fCatalyst+reports%2fChris+hurcombe%2fCurrent+App+Reports";
text = "Report 2";
}
var link=""+url+"\" onMouseOver=\"window.status='"+text+"'\">"+text+"</A>";
document.write(link);
// End -->
</SCRIPT>
[/pre]

Collapse -

still stuck

by tim.williams In reply to here is the url's added.. ...

Jaqui's

I copied the script into notepad and saved it as rotate.html
when I open the file in my browser it does nothing, do you know what I am doing wrong?

Thanks

Tim

Collapse -

No...he wants a different page to load after 2 minutes

by bschaettle In reply to here is a javascript

Jaqui,
I believe he wants the browser to reload an entirely different URL every two minutes. He can do this using a META tag, in the header, as shown below. The META tag in the second file would point back to the first one, and vice-versa. These pages will swap every 120 seconds in the same browser window.

<HTML>
<HEAD>
<TITLE>Report 1</TITLE>
<META http-equiv="Refresh"
content="120;
URL=Report2.htm">
</HEAD>
<BODY>
Welcome to Report 1...
</BODY>
</HTML>

Collapse -

Thanks All

by tim.williams In reply to No...he wants a different ...

Hi All

Many thanks for your help

I really appreciate your help

I am going to try the HTML one as I am better with HTML than JS, but thatnks to all of you for your help

Tim

Collapse -

one JS function for both web pages

by ebuild In reply to Swapping Between Web Page ...

<javascript>
function swapme(){
window.location='theOtherPageThanTheCurrent';
this.setTimeOut(DurationInMilleseconds);
}
</javascript>
....
<body "onload=swapme()">
....

Collapse -

Unique JS function for both web pages

by ebuild In reply to Swapping Between Web Page ...

<javascript>
function swapme(){
window.location='theOtherPageThanTheCurrent';
this.setTimeOut(DurationInMilleseconds);
}
</javascript>
....
<body "onload=swapme()">
....

Back to Web Development Forum
10 total posts (Page 1 of 1)  

Related Discussions

Related Forums