• Welcome to Pelicar Fantasy RPG Forum.
 

News:

Jul 6, 2023 - Forum patched to version 2.1.4 | RSS2.0 Feed

Pelicar Game Website

Main Menu

setTimeout?

Started by Dj, Jun 07, 2007, 01:22:28 PM

Previous topic - Next topic

Dj

Head,

Can you add a javascript command on the "onLoad" event of the main forum page (index, I think) to have a setTimeout to reload the page every...say 3 minutes. That way if you are just sitting there on that page and someone messages you or a new topic happens or whatever, it would auto-refresh.

Just a thought.
Thank you Mario! But our Princess is in another castle!

Head

Yeah.. might be able to do that...  really only want it to do that when you're looking at the main board index.  Kinda suck for the forum to refresh in the middle of reading a thread or writing up a post. 
"Drawing on my fine command of the English language, I said nothing." - Robert Benchley
Twitter: @mrheadrick

Dj

Agreed; that was the only page I thought it would be practical for...
Thank you Mario! But our Princess is in another castle!

Cope

Now we are really getting lazy.......I like it.
We cannot banish dangers, but we can banish fears.  We must not demean life by standing in awe of death.

Head

Well.. it's working (for me anyway).  Board will auto-refresh after three minutes when looking at the main page.  It adds a meta refresh tag.


<META http-equiv="refresh" content="180" />


It checks the contents of $_SERVER[QUERY_STRING] which contains everything past the "?" in the URL (address bar).  If it's empty, it knows it's at the main page; otherwise, there would be something in it.


"Drawing on my fine command of the English language, I said nothing." - Robert Benchley
Twitter: @mrheadrick

Dj

Sweet!

Irving: What's an infrastructure? Is this a good place to hide from my mother-in-law?
Thank you Mario! But our Princess is in another castle!

Fingers

Verin? (Yes?) Recant huh? (Yes.) And that really means to dispute one's word? (For the last time, YES!) See I know'd ta be scared o dem lernin books! Einstein's ta blame, always pushin everbody ta be more 'n they are! (Ugh!) I know why LB came, but why'd you? (Times are, I ask that myself. Now eat!)

Dj

Of course, the downside to the setTimeout is that if you leave the browser open all night long, then it never "logs you out."
Thank you Mario! But our Princess is in another castle!

Head

Yeah.. LOL.. need to remember to close the browser or tab otherwise it keeps showing you're on the board when you're really not.

I'm off to get some pizza  :pizza:
"Drawing on my fine command of the English language, I said nothing." - Robert Benchley
Twitter: @mrheadrick

Dj

Another possible place for the refresh might be the "?action=who" parameter page.
Thank you Mario! But our Princess is in another castle!

Head

It has been done.. 
"Drawing on my fine command of the English language, I said nothing." - Robert Benchley
Twitter: @mrheadrick

Head

Yeah, I moved the topic to here.  Anyway, I've added the "Show unread posts since last visit" to this list of pages that will refresh itself.  Of course, remember to close browser/tab when not actually around.  :)
"Drawing on my fine command of the English language, I said nothing." - Robert Benchley
Twitter: @mrheadrick