PDA

View Full Version : Live date & time in title bar


AdamC
01-16-2003, 10:35 AM
I've recently seen a site that returns the date and time in the title bar when a site is requested.

By viewing the source I'm left none-the-wiser as to how its done. I've seen a few javascripts that do something similar, but I'm interested to know how its being done in this case.

More to the point I'm interested in incorporating something similar into one of my sites, but perhaps having the date on the page rather than in the title.

I suspect they're using something like asp rather than js.

raf
01-16-2003, 12:05 PM
response.write(Date()) puts the server date on the page
response.write(Now()) puts the date and time on page
response.write(Time()) puts the time on the page
...
+ you can choose the date/time format

what exactly are you trying to do ?

Leeus
01-16-2003, 12:35 PM
This is how they would have done it, or not using the now() but using what raf said.

<title>Prudential - <%=now()%></title>