CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Update text field by clicking a button?

Print topic Send  topic

Author Message
Richard
Posted: 10/22/2002, 3:28 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
Nicole
Posted: 10/24/2002, 6:17 AM

Richard,
Add button from the Forms tab and:
1. create client side OnClick event for it that will insert current date into textbox field. Use code like below (javascript):
var dteCur=new Date;
document.form_name.field_name.valie = dteCur.getDay()+ "/" + dteCur.getMonth() + "/" + dteCur.getYear();

2. to display button when record form is in insert mode only, create button or form Before Show event (check both, I haven’t tested it) where check the form’s mode (Insert or Edit) and set button Visible property to false in edit mode. E.g. (PHP)
global $form_name;
globval $button_name;
if ($form_name->EditMode)
$button_name->Visible = false;

   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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