Author Topic: automatic refresh  (Read 26268 times)

kev222

  • VCUBs
  • Keepin' secrets at midnight
  • *
  • Posts: 3194
  • zero vector
    • AOL Instant Messenger - k3v222
    • View Profile
    • http://www.kev.nu/vc
    • Email
automatic refresh
« Reply #15 on: September 02, 2004, 04:02:21 am »
As per request of Ty. This is a php-less JavaScript version. enjoy :)

1. Still too lazy to make it work with anything other than the index.
2. Tested only in Firefox. So you may get problems in IE. But anybody not using FireFox deserves to get problems ;-)

http://www.kev.nu/vc/refresh.html

And the code.

Code: [Select]

<html>
<head>
<title>NH.com auto refresh (JS version)</title>
<script language="javascript">
var intid = 0;

function refresh() {
document.getElementById("fframe").src = "http://forum.nessaholics.com";
}

function start() {
var inter = parseInt(document.getElementById("inter").value) * 1000;

if(!intid && inter >= 5000) {
refresh();
intid = setInterval("refresh();", inter);
}
else
alert("dumbass");
}

function stop() {
if(intid) {
clearInterval(intid);
intid = 0;
}
}

</script>

</head>

<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
Interval: <input type="text" id="inter" value="60"/>&nbsp;seconds (min: 5)&nbsp;&nbsp;&nbsp;<a href="#" onclick="start();">start</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="stop();">stop</a>
</td>
</tr>
<tr>
<td valign="top">
<iframe id="fframe" frameborder="0" src="http://forum.nessaholics.com/" width="100%" height="600"></iframe>
</td>
</tr>
</table>
</body>
</html>


-Kev

tylor2000

  • You never thought it'd hurt so bad
  • *****
  • Posts: 2930
    • View Profile
automatic refresh
« Reply #16 on: September 02, 2004, 04:59:30 am »
Who's Online Automatic Refresh

http://www.geocities.com/tnt____/automatic_refresh.html#

Code: [Select]

<html>
<head>
<title>NH.com auto refresh (JS version)</title>
<script language="javascript">
var intid = 0;

function refresh() {
   document.getElementById("fframe").src = "http://forums.nessaholics.com/viewonline.php";
}

function start() {
   var inter = parseInt(document.getElementById("inter").value) * 1000;
   
   if(!intid && inter > 0) {
      refresh();
      intid = setInterval("refresh();", inter);
   }
   else
      alert("dumbass");
}

function stop() {
   if(intid) {
      clearInterval(intid);
      intid = 0;
   }
}

</script>

</head>

<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>
   <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
         <td valign="top">
            Interval: <input type="text" id="inter" value="60"/>&nbsp;seconds &nbsp;&nbsp;&nbsp;<a href="#" onclick="start();">start</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="stop();">stop</a>
         </td>
      </tr>
      <tr>
         <td valign="top">
            <iframe id="fframe" frameborder="0" src="http://forums.nessaholics.com/viewonline.php" width="100%" height="600"></iframe>
         </td>
      </tr>
   </table>
</body>
</html>

kev222

  • VCUBs
  • Keepin' secrets at midnight
  • *
  • Posts: 3194
  • zero vector
    • AOL Instant Messenger - k3v222
    • View Profile
    • http://www.kev.nu/vc
    • Email
automatic refresh
« Reply #17 on: September 02, 2004, 05:29:15 am »
Quote from: "tylor2000"
Who's Online Automatic Refresh

Code theif!

kev222

  • VCUBs
  • Keepin' secrets at midnight
  • *
  • Posts: 3194
  • zero vector
    • AOL Instant Messenger - k3v222
    • View Profile
    • http://www.kev.nu/vc
    • Email
automatic refresh
« Reply #18 on: September 02, 2004, 05:38:05 am »
Although, I'm glad you left the "dumbass" in ;-)

tylor2000

  • You never thought it'd hurt so bad
  • *****
  • Posts: 2930
    • View Profile
automatic refresh
« Reply #19 on: September 02, 2004, 06:14:25 am »
I essentially disabled it though.

tylor

kev222

  • VCUBs
  • Keepin' secrets at midnight
  • *
  • Posts: 3194
  • zero vector
    • AOL Instant Messenger - k3v222
    • View Profile
    • http://www.kev.nu/vc
    • Email
automatic refresh
« Reply #20 on: September 02, 2004, 06:24:32 am »
Quote from: "tylor2000"
I essentially disabled it though.

tylor

Not quite. If someone enters a zero or negative interval or clicks start when it is already running, they will get insulted (and rightly so 8))

-Kev

tylor2000

  • You never thought it'd hurt so bad
  • *****
  • Posts: 2930
    • View Profile
automatic refresh
« Reply #21 on: September 02, 2004, 06:31:36 am »
Quote from: "kev222"
Quote from: "tylor2000"
I essentially disabled it though.

tylor

Not quite. If someone enters a zero or negative interval or clicks start when it is already running, they will get insulted (and rightly so 8))

-Kev


lol

I'll edit it later, dumbass. ;)

tylor

Scotty

  • Keepin' secrets at midnight
  • *****
  • Posts: 3794
    • MSN Messenger - c_slaughter14@hotmail.com
    • AOL Instant Messenger - pianoguy1588
    • Yahoo Instant Messenger - nessaholic88@hotmail.com
    • View Profile
automatic refresh
« Reply #22 on: September 02, 2004, 09:18:15 am »
Yay I love it! :D

Unoriginal Dum-Dums

kev222

  • VCUBs
  • Keepin' secrets at midnight
  • *
  • Posts: 3194
  • zero vector
    • AOL Instant Messenger - k3v222
    • View Profile
    • http://www.kev.nu/vc
    • Email
automatic refresh
« Reply #23 on: September 02, 2004, 10:28:27 am »
Quote from: "Scotty"
Yay I love it! :D

Which one? Mine, or that dumbass Tylor's?

-Kev

Scotty

  • Keepin' secrets at midnight
  • *****
  • Posts: 3794
    • MSN Messenger - c_slaughter14@hotmail.com
    • AOL Instant Messenger - pianoguy1588
    • Yahoo Instant Messenger - nessaholic88@hotmail.com
    • View Profile
automatic refresh
« Reply #24 on: September 02, 2004, 11:37:18 am »
Quote from: "kev222"
Quote from: "Scotty"
Yay I love it! :D

Which one? Mine, or that dumbass Tylor's?

-Kev


Your's all might Anglo Duck!

Unoriginal Dum-Dums

tylor2000

  • You never thought it'd hurt so bad
  • *****
  • Posts: 2930
    • View Profile
automatic refresh
« Reply #25 on: September 03, 2004, 12:16:51 am »
I updated the code on mine.  Erased the 'dumbass' off of it, dumbass. :wink:


Code: [Select]
<html>
<head>
<title>NH.com 'Who's online' automatic refresh (JS version)</title>
<script language="javascript">
var intid = 0;

function refresh() {
   document.getElementById("fframe").src = "http://forums.nessaholics.com/viewonline.php";
}

function start() {
   var inter = parseInt(document.getElementById("inter").value) * 1000;
   
   if(!intid && inter > 0) {
      refresh();
      intid = setInterval("refresh();", inter);
   }
   else
      alert("Error: 107x has occurred.  A virus has begun to infect your hard drive.  Please erase all infected files.")        
if (confirm("Please inform the the hardware vendor of this error."))
alert('The virus has been contained but the browser will shutdown to check for and prevent further internal damages.');
else
alert('The problem has not been fixed, the browser must be shut downtown to prevent further contamination.');
  {              
parent.close();        
   }
}
function stop() {
   if(intid) {
      clearInterval(intid);
      intid = 0;
   }
}

</script>

</head>

<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>
   <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
         <td valign="top">
            Interval: <input type="text" id="inter" value="60"/>&nbsp;seconds &nbsp;&nbsp;&nbsp;<a href="#" onclick="start();">start</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="stop();">stop</a>
         </td>
      </tr>
      <tr>
         <td valign="top">
            <iframe id="fframe" frameborder="0" src="http://forums.nessaholics.com/viewonline.php" width="100%" height="600"></iframe>
         </td>
      </tr>
   </table>
</body>
</html>

kev222

  • VCUBs
  • Keepin' secrets at midnight
  • *
  • Posts: 3194
  • zero vector
    • AOL Instant Messenger - k3v222
    • View Profile
    • http://www.kev.nu/vc
    • Email
automatic refresh
« Reply #26 on: September 03, 2004, 12:35:35 am »
Evil  :twisted:

Grakthis

  • VCUBs
  • Keepin' secrets at midnight
  • *
  • Posts: 3983
  • Lord Andrew
    • AOL Instant Messenger - Grakthis
    • View Profile
    • http://www.grakthis.com
automatic refresh
« Reply #27 on: September 03, 2004, 06:27:05 am »
Quote from: "tylor2000"
I updated the code on mine.  Erased the 'dumbass' off of it, dumbass. :wink:


lolerskates!
If you are reading this, you are probably on my ignore list.  Click here to return the favor

Wagella Wrote:Yay for Bigotry!!

---Andrew