CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 TimeStamp button

Print topic Send  topic

Author Message
MikeL
Posted: 08/05/2002, 11:54 AM

Has anyone run across a simple javascript that inserts a Date/Time stamp into a text area field, that does not use a popup calendar? I only need to insert the current date/time when the user clicks on a button.

TIA
Nicole
Posted: 08/06/2002, 6:39 AM

Mike,
here is solution for CCS (but javascript code expression is universal)
- add client side onclick event for the button and enter the code like:
document.form_name.field_name.value = d.getDate() + "/" + d.getMonth() + "/" + d.getYear() + " - " + d.getHours() + ":"+ d.getMinutes() + ":"+ d.getSeconds();

In case you work with CC you should place the javascript function body in form Footer section.
MikeL
Posted: 08/07/2002, 1:35 PM

Is "document" in document.form_name.field_name.value literal? I have tried to use this, but I get "Errors on Page" when I try to view the page. The error is more specifically document.forms.REQ_IT.all is null or not an object.

My form is REQ_IT, field is WORKLOG (that I want timestamp inserted to).

Thanks

   


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.