Solved

Automatically Loading Pages

Posted on 1997-03-01
1
197 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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This video teaches users how to migrate an existing Wordpress website to a new domain.

679 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