Richard
|
| Posted: 10/23/2002, 2:45 PM |
|
I have a form that submits data to an access database, using PHP code. What I need to happen is that when a user clicks a button next to a text field, the current date and time is inputted into that text field, and the button then disabled. When this same record is called up again for editing any of the fields that do contain date and time from previous updates should be locked and the button disabled, so that this cannot be changed. It is to be used for a tech support application, so locking these fields after updates is essential so that we can track the performance of the response to service level. I have searched these boards and have yet to find any hints on how to do this, so any assistance would be very much appreciated. Thanks
Richard
|
|
|
 |
MikeL
|
| Posted: 10/24/2002, 5:40 AM |
|
I have done something similiar, except disabling the button after it it clicked. Add a form button from the toolbox then add the following onclick code (or something similiar)in the html view:
<!-- BEGIN Button TimeStamp --><input class="NavyButton" type="button" value="TimeStamp" name="TimeStamp" onclick="now = new Date(); document.<form_name>.<form_field>.value = document.<form_name>.<form_field>.value + now.getDate() + '/' + now.getMonth() + '/' + now.getYear() + ' ' + now.getHours() + ':'+ now.getMinutes() + ':'+ now.getSeconds() + '\n\r';"><!-- END Button TimeStamp -->
The onclick event appends the current date and time and a new line to the associated field. Be sure to substitute your form name for <form_name> and text field name for <field_name>.
Hope this helps get you started in the right direction.
Mike
|
|
|
 |
|