Link to home
Start Free TrialLog in
Avatar of bfeddish
bfeddishFlag for United States of America

asked on

Refreshing the browser window

I have a regular ASP page (not ASP.NET) and I wan't to continuously refresh the page without having to hit a submit button or anything. I need something like the timer in ASP. NET.
SOLUTION
Avatar of Rodney Helsens
Rodney Helsens

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bfeddish

ASKER


I liked Nighman's the best but the others look useful too.  I upped the points and split them for everybody.

Thanks!
Avatar of BraveBrain
There's really no point in using setInterval though, as the interval clears when the page reloads.

The most compatible way of doing it would be something like this;

<script language="JavaScript" type="text/javascript">
<!--
setTimeout('document.location.assign(location.href)',5000);
//-->
</script>

That one is supported by all JavaScript enabled browsers.
5000 is the time in milliseconds before the action is triggered; 5 seconds.

If you still prefer setInterval this will be enough;

<script language="JavaScript1.2" type="text/javascript">
<!--
setInterval('document.location.reload()',5000);
//-->
</script>


FYI  ;)