Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: PSP timer Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
SteveA
Groupie
Groupie


Joined: November 28 2002
Location: United States
Online Status: Offline
Posts: 49
Posted: November 17 2004 at 19:58 | IP Logged Quote SteveA

Dave...

Hope this is a easy one. How did you get your PSP page to automatically update on a timer?

Thanks, SA


__________________
SteveA
Back to Top View SteveA's Profile Search for other posts by SteveA Visit SteveA's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 17 2004 at 20:27 | IP Logged Quote dhoward

Steve,

It's fairly simple. A lot of examples exist on the net. The one I used is distilled to it's simplest form here:

<html>
<head>
<title>PowerHome</title>
<script language="javascript">
var cdp = 60;var cdt = cdp + 1;
function f_cd(){cdt --;if(cdt <= 0){clearTimeout(counter);window.location.replace('/');return;}if(document.all)document.all.cdtt.innerText = cdt + " ";else if(document.getElementById)document.getElementById("cdtt").innerHTML = cdt + " ";counter = setTimeout("f_cd()",1000);}
function f_refresh(){if(document.all || document.getElementById){document.write('<a href= "javascript:window.location.replace(\'/\')">Refresh</a> in <b id="cdtt">' + cdt + ' </b> seconds');f_cd();}else document.write('<a href= "javascript:window.location.replace(\'/\')">Refresh</a>');}
</script>
</head>
<body bgcolor="#ffffff">
<script>f_refresh()</script>
</body>
</html>

You should be able to copy and paste the essentials from the above code.

Let me know if this is what you wanted or not.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum