Solved

Automatically Loading Pages

Posted on 1997-03-01
1
196 Views
Last Modified: 2013-12-25
I'm developing an intranet application where the user has no access to the computer, so I need a way of loading pages automatically.  I know of the client pull command, but the problem is I don't own the pages I want to load.  Therefore, I can't edit the pages.  My goal is load approx. 10 unowned,preselected pages, one every ten seconds, without user input.  Then loop back to the first preselected page and continue indefinitly.   All I want the user to see on the screen is the loaded web page.  Is there a way to do this?  Can I use Java scrip? If so how?

0
Comment
Question by:missle
1 Comment
 
LVL 3

Accepted Solution

by:
pc012197 earned 150 total points
ID: 1853914
There are several ways to do this in JavaScript. In any case you'll have to load a starting page, which you have to write yourself. That page would contain Javascript code to cycle through the other documents.
You could display the other documents in a new browser window, which would be opened by the Javascript program. Or you could split a window into two frames, one of these would contain only your Javascript code (and could therefore be quite small), the other frame would display the pages.

An example:
<html><head><title>startpage</title>
<script>

function initArray() {
      this.length = initArray.arguments.length
      for (var i = 0; i < this.length; i++)
      this[i+1] = initArray.arguments[i]
   }

newWin=0;
current=1;
pages=initArray("your://first/url","your://second/url");

function startCycle() {
  newWin=window.open(pages[1], "newWindow" );
  window.setTimeout("doCycle();",10000);
}

function doCycle() {
  newWin.close();
  current = (current % pages.length) + 1;
  newWin=window.open( pages[current], "newWindow" );
  window.setTimeout("doCycle();", 10000);
}
</script>
</head><body onLoad="startCycle();">
This is just a dummy page.
</body>
</html>

I haven't tried this, so there may be a few bugs, but in principle it can be done like this.

0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about why website design really matters in today's demanding market.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
The viewer will learn how to dynamically set the form action using jQuery.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question