[thelist] javascript:location.reload() <3

Dan Stockton prosayist at yahoo.com
Tue Oct 1 17:37:01 CDT 2002


k, here's the deal;
I'm modifying a moreover news search script (from http://www.newsaide.com/)
basically, it says "search for the headlines. If there are some results,
display'em.. if there are none, write "sorry, no results" (but sometimes, if
you search and it says 'sorry', it's just bein' stubborn, or timed out with
the first request or somethin' and if you refresh the results page it shows
something.. sometimes you hafta refresh twice)
So I changed it to say "search for the headlines. If there are some results,
display'em.. if there are none, location.reload" (or
'location.href=document.location')
Now I have this problem.. it works fine if there really is something and it
just didn't find it the first time (or the second time) but if it's some
obscure search term where there really is no news it keeps reloading..
forever.
Hence: my question-
how can I know how many times a page has reloaded?
((__if(var refreshpage<3){location.reload}
else{document.write"sorry"}__type-o'thing, y'know?)))

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com



More information about the thelist mailing list