CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Update fields from database when one changes

Print topic Send  topic

Author Message

Posts: 1
Posted: 01/20/2004, 12:01 PM

I need to know if there is a way to update fields on an ADD page when one of the others changes. For example, I enter a staff id in the field wo_staff_id. Is there a way to have the staff id be used to look up the employee in a table and enter the last name (lname) and first name (fname) when the staff id is not blank? Thanks for the assistance.
View profile  Send private message

Posts: 5971
Posted: 01/20/2004, 3:24 PM

Yes, there are two common approaches to implememt this.

One is to create server code that will create JavaScript with the list of all employees, so that all employees are stored in the HTML and when an ID is selected, the browser can immediately populate the values of the other fields.
An example of this functionality is on our "Knowledge Base" example (adm_kb_article_maint page) available to CCS users:

Though you can probably find various JavaScript examples on the net:

The 2nd approach is to use simple JavaScript to automatically submit your form when the value of the 1st field changes. This is briefly discussed here:

An example of the 2nd implementation is available here:
Peter R.
YesSoftware Forums Moderator
For product support please visit
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

MS Access to Web

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

Home   |    Search   |    Members   |    Register   |    Login

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