Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
ok heres the deal
i have a frame set, 1 of the frames is hidden, it contains a script, which is exectuted every 3 mins via meta refresh, works great, however
if a user refresh the page using the menu bar refresh option, all the pages within the frame set are refreshed, including my code
is their a way to prevent this.... or perhaps some code or anythin.....
the code needs to be executed automatically for each user every 3 mins...

I can't see any way of doing that, but there might be another way to accomplish it.
I am assuming that you are using the setTimeout function in javascript to execute your code - which when refreshed restarts the time (which you don't want).
However if the main frameset page and the hidden frame page are strait HTML (i.e. not processed pages such as ASP or PHP) you might be able to do it another way.
On your hidden page create a script that runs every second. The script would check a hidden field. If the field is empty, the script populates the field with the current time (and executes the needed action if you needed it run when the user first enters). In my test I found that form fields were not emptied when the pag was refreshed if the page was not processed. So, each subsequent time this script runs, it checks if the current time is > 3 minutes from the last saved time. If so, it populates the new time in the field and executes the action.
So, if the page is refreshed, it will still work ok. You might have to test it on a few different os/browser combinations to ensure that the value in the hidden field is not blanked when the page is refreshed. But, it works that way on my Win\IE system.
Michael J


![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |