Computing.Net > Forums > Web Development > frame refresh

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

frame refresh

Reply to Message Icon

Name: Jamie_McCoy
Date: April 13, 2005 at 20:17:02 Pacific
OS: XP Pro 5.1
CPU/Ram: Pentium 4 2.4Ghz
Comment:

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...

roamhosting.net



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: April 13, 2005 at 21:39:28 Pacific
Reply:

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


0

Response Number 2
Name: Jamie_McCoy
Date: April 14, 2005 at 11:49:54 Pacific
Reply:

yove just give me an alternitive idea... ill check itout, similar to your approach tho... cheers

roamhosting.net


0

Response Number 3
Name: Jamie_McCoy
Date: April 15, 2005 at 01:53:07 Pacific
Reply:

problem now solved ive used the time(); function to compare 2 times.... workin fine

roamhosting.net


0

Response Number 4
Name: Michael J (by mjdamato)
Date: April 15, 2005 at 02:19:34 Pacific
Reply:

I'm curious. How are you saving the original time - in a variable?

Michael J


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: frame refresh

Frame - Page Title www.computing.net/answers/webdevel/frame-page-title/215.html

Refresh the part of site www.computing.net/answers/webdevel/refresh-the-part-of-site/1716.html

Refresh once on pageload www.computing.net/answers/webdevel/refresh-once-on-pageload/3244.html