Is there any reason why when a user loads a page with a setInterval, then leaves the page and returns to it via the BACK button of the browser, that the page now no longer has the setInterval stuff running?
@gil_davisDec 04.2002 — #Pressing the "back" button causes the window to reload a page from it's history. A reload causes all parameters for that page to be initialized. It's like pressing reset on your computer. Only functions in the onLoad event will start. There is no "memory" other than the URL of the page that resides in the history.
Thats what I thought, but when I have three frames, each with a setInterval, sometimes flipping forward and back with my main frame causes some of the surrounding frames to stop doing their interval.
@Zach_ElfersDec 04.2002 — #Actually, I don't think hitting back reloads the page. For example. You click a link and that anoying dotted line appears around it and you go to the next page. You hit back and the outline is still there.?
@gil_davisDec 04.2002 — #[i]Originally posted by Zach Elfers [/i]
[B]Actually, I don't think hitting back reloads the page.[/B][/QUOTE]
Well, what would you call it?
Whatever it is, the last state of the page is not retained. Some browsers will return you to your place, and the dotted line around the link is a visual cue to tell you the last link you clicked on in the page - a totally different situation from a JS function running.
@gil_davisDec 04.2002 — #[i]Originally posted by Doug_Dyer [/i]
[B]when I have three frames, each with a setInterval, sometimes flipping forward and back with my main frame causes some of the surrounding frames to stop doing their interval.[/B][/QUOTE]
Maybe a bug. Is the code in the frameset or in each frame? Are you getting any JS errors?
The code is within a <SPAN> area at the top of each src file for each frame.
On an onload, I do setInterval on my routine. The javascript for each frame involves loading javascript files from the server that in turn do something dynamic to the respective frame.
Hence, every few seconds each frame should do something.
For some reason, every once in a while Ill go "back" and nothing changes unless I do a page reload.