Re: Can I get the Client's Time instead of the Server's?
You need to use a little Javascript on the client to pass the uses timezone to the server The following will write a hidden field containing the offset in minute between the locale time and GMT script n = new Date(); str = "input type='hidden' value='" + n.getTimezoneOffset() + "' name='offset'"; document.write(str); /script or you chould write it to a cookie for later use.. You can store the offset in a session var ~Justin - Original Message - From: "Mark Armendariz" [EMAIL PROTECTED] To: "Cf-Talk" [EMAIL PROTECTED] Sent: Monday, August 28, 2000 4:28 PM Subject: Can I get the Client's Time instead of the Server's? Is there a way to do a Now() of some sorts in CF to get the client's present time instead of the server's? Thanks in Advance Mark Armendariz -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: Can I get the Client's Time instead of the Server's?
Is there a way to do a Now() of some sorts in CF to get the client's present time instead of the server's? No. CF is simply not capable of doing anything "on the client", and unless the client supplies the time via a CGI, FORM or URL variable, CF has no idea what time it is on the client. If you want to do something like this, you'll have to use JavaScript. It's easy to do this kind of stuff in JavaScript. It's important to remember what exactly CF does. It can do lots of nifty things, but in the end, it generates ASCII text output. That's it. It's a server-side scripting language, or an "application server" if you will. It doesn't communicate directly with the client in any meaningful way - that's done by the web server, which sits between the client and CF. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: Can I get the Client's Time instead of the Server's?
perfect... justin, i appreciate the example. and thanks to dave watts for the js explanation... Mark -Original Message- From: JustinMacCarthy [mailto:[EMAIL PROTECTED]] Sent: Monday, August 28, 2000 11:48 AM To: [EMAIL PROTECTED] Subject: Re: Can I get the Client's Time instead of the Server's? You need to use a little Javascript on the client to pass the uses timezone to the server The following will write a hidden field containing the offset in minute between the locale time and GMT script n = new Date(); str = "input type='hidden' value='" + n.getTimezoneOffset() + "' name='offset'"; document.write(str); /script or you chould write it to a cookie for later use.. You can store the offset in a session var ~Justin - Original Message - From: "Mark Armendariz" [EMAIL PROTECTED] To: "Cf-Talk" [EMAIL PROTECTED] Sent: Monday, August 28, 2000 4:28 PM Subject: Can I get the Client's Time instead of the Server's? Is there a way to do a Now() of some sorts in CF to get the client's present time instead of the server's? Thanks in Advance Mark Armendariz -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.