twpeguin
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.
_________________
tammy |
|
|
peterr
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: http://www.codecharge.com/ccsprojects/indexkb.php
Though you can probably find various JavaScript examples on the net: http://www.google.com/search?q=javascript+onchange+populate+dynamically
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: http://forums.codecharge.com/posts.php?post_id=27226
An example of the 2nd implementation is available here: http://support.codecharge.com/kb_article.asp?article_id=61
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|