CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 current time from client not server

Print topic Send  topic

Author Message
kevind
Posted: 11/09/2002, 10:03 AM

I have the current date & time appear in a new record form and make the field read-only so I can capture the time the record was created.

The server is in a different time zone and I want to pick-up the client's date and time or subtract the difference from the server's time as all users are in the same time zone.

Any simple suggestions ?
Kevin
yodabear
Posted: 11/09/2002, 2:22 PM

Try javascript
Jeremy
Posted: 11/10/2002, 10:48 PM

dayName = new Array ("Sunday", "Monday" , "Tuesday" , "Wednesday" , "Thursday" , "Friday" , "Saturday" )

monthName = new Array ("January" , "February", "March" ,"April" , "May" , "June", "July" , "August" , "September", "October" , "November", "December")

now = new Date

document.write("span class = \"formelementlabel\">" + dayName[now.getDay()] + ", " + monthName[now.getMonth()] + " " + now.getDate()+", " + now.getFullYear()+"</span>")


example for you anyway.....of course you will need the <script> tags etc. You could probably find a better example on webmonkey or some other site, and just use an event to write that to the field when the form loads.

-Jeremy
kevind
Posted: 11/11/2002, 9:14 AM

just dropped a vbscript command at the bottom of the html code to override the value in the field - 1 line of code

thanks everyone for your responses

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.