Solved

Automatically Loading Pages

Posted on 1997-03-01
1
192 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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now