lucanos@gmail.com wrote:[color=blue]
> Hey Guys,
>
> Hoping that you can help me, as I have been scratching my head and
> getting nothing but dandruff...
>
> SITUATION
> ---------
> I have a webpage which users will be viewing, which has forms which can
> be hidden or displayed at the user's choice. The problem is that they
> want the page to refresh every X seconds, but if it refreshes when a
> form is displayed, then the form loses the entered data and disappears
> as the screen is redrawn, meaning the user has to write it all up
> again.
>
> MISSION
> -------
> I want to create a JavaScript refresh function, which will only refresh
> the page if a certain condition is met. The condition will be a
> variable which will count the number of forms currently being
> displayed. If the variable ('openForms') is 0, then the refresh should
> be executed.
>
> ATTEMPTS THUSFAR
> ----------------
> function refreshCounter() {
> Id = setTimeout( refreshWindow() , 100000 );
> }[/color]
<SNIP>
Id = setTimeout( refreshWindow() , 100000 );
should be
window.setTimeout("refreshWindow()",100000);