[Javascript] Page refresh only once - reg

Anthony Ettinger apwebdesign at yahoo.com
Sat Oct 15 11:39:25 CDT 2005


> my code is...
>  
> <script language=javascript>
> function pagereload()
> {
>       window.location.reload();
> }
> </script>

> that function called in body onLoad event
>  
> <body onLoad="pagereload()">
>  
> this function is working but it will do in loop.

window.location.pagereload(); <-- is this what you
mean?


If so, you're calling it recursively.

All you need is to put this at the top of your js
file:

window.onload = init();

function init()
{
   //initialize form
}


Anthony Ettinger
ph: (408) 656-2473
blog: http://www.chovy.com



More information about the Javascript mailing list