Erwin Moller
<si******************************************@spam yourself.com> did so
declare (news:42***********************@news.xs4all.nl) :
Christopher wrote:
Hi all,
Sorry if this is a silly question but I've been having a heck of a
hard time with it and hope somebody here can lend me a hand.
I have a site with a news pages and I'd like the navigation to
include a blinking 'NEW!' when that page has been updated within the
last three days.
It works fine for the one page (if you're on the news page, it works
great) but I can't figure out how to check the time/date stamp on a
file other than the one currently loaded ... any help would be
greatly appreciated.
c.
--
Hi Christopher,
This really would be a lot easier for you if you use serverside
scripting (like PHP).
If that is an option for you: try it.
If that is not an option.... you will have to try a really clumbersome
approach I am afraid, like loading all the possible pages in a hidden
frame, get the modificationdate, store it in a parentframe, and let JS
query it for each page...
I am not even sure if that will work, and it will be slow for sure.
Please have a look at serverside scripting.
Chances are that your current hostingprovider is offering it already
with your current account.
Hope this helps.
Good luck.
Regards,
Erwin Moller
Hi Erwin, thanks ... I found a solution in the end, pretty clever really.
I run a check for a cookie on each page ... if the cookie is not present,
I place a cookie with the current URL, and redirect them to the news
page.
The news page updates the value of 'last updated' and redirects them to
the URL stored in a cookie, the whole process takes about a second the
first time people come to the site during a 24 hour period, it's an
intranet so traffic is controlled anyways but without access to PHP or
ASP ... the whole process was a bit of a pain.
THanks for your suggestion.
c.
--