You need to understand that since javascript is Client Side technology, when you call: new Date() it takes the time and date from the users PC, not the server since the script is running on the client, not the server.
However, you can meld these 2 scripts together. Keep the code in your most recent post add this to the top of the page:
<%@ LANGUAGE="JavaScript" %>
<%
/*** Clock -- beginning of server-side support code
by Andrew Shearer,
http://www.shearersoftware.com/
v2.1-ASP, 2002-10-12. For updates and explanations, see
<http://www.shearersoftware.com/software/web-tools/clock/>. ***/
/* Prevent this page from being cached (though some browsers still
cache the page anyway, which is why we use cookies). This is
only important if the cookie is deleted while the page is still
cached (and for ancient browsers that don't know about Cache-Control).
If that's not an issue, you may be able to get away with
"Cache-Control: private" instead. */
Response.AddHeader("Pragma", "no-cache");
/* Grab the current server time. */
var gDate = new Date();
/* Are the seconds shown by default? When changing this, also change the
JavaScript client code's definition of clockShowsSeconds below to match. */
var clockShowsSeconds = false;
function getServerDateItems() {
return gDate.getFullYear()+","+gDate.getMonth()+","+gDate .getDate()+","
+gDate.getHours()+","+gDate.getMinutes()+","+gDate .getSeconds();
}
/*** Clock -- end of server-side support code ***/
%>
Then in your above code change this:
var clock_time = new Date();
to
var clock_time = new Date(<%=getServerDateItems()%>);
which should give you the correct server time.
================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========