Hi, Could someone help me with this one please. I need to find out the time on my server ( not clients machine ), using javascript, while executing a page. How do I go about doing it?
you'll need to incorpurate some sort of server side coding to gain access to the server time. ASp, PHP etc.
_______________________________________________ { str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"alert(Nstr); }
_______________________________________________
for the best results to your questions: FAQ333-2924
has you're questio
how do i go about doing that? do I simply need the time at the point of generation of page. don't need it when user clicks on any button or anything. would i still need php asp? thanks.
as far as I remember there's no way to get it on the client level.
you'll need to figure out what you have the resources to run server side. if you have the option to run a ASP page then it would be fairly simple to get it.
Here's a ASP example:
function srvTime() {
var CurSrvTime = <%=now%>
}
and then save the page as a .asp page.
I may be wrong on the javascript capabilities but I'm fairly certain. _______________________________________________ { str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"alert(Nstr); }
_______________________________________________
for the best results to your questions: FAQ333-2924
has you're questio
I know this is old technology, but you could use server side includes too...I can't say as that I remember what the call for the server time is tho. Robert Carpenter
questions? comments? thanks? email me!
linkemapx@hotmail.com
Icq: 124408594
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.