
AndrewLewis
Posts: 1
|
| Posted: 09/17/2008, 12:06 PM |
|
I have a page in my website which serves to edit procedure records. The page contains a listbox for choosing patients from an existing list of patients in the database. That listbox autofills various patient-dependent textboxes on the page (things like address, email, etc). So the user can choose a different patient from the listbox, and see the various values autofill in the textboxes.
These fields are textboxes as opposed to say labels because the customer wants the ability to edit patient data on this page directly. So you can update a patient's address while you are filling out the form by changing the values in the text fields. I already have taken care of doing that in the stored procedure that handles record inserts or updates, so that is OK.
But...now the customer wants to be able to save changes to an existing patient's data when a different patient is chosen from the listbox, before the overall page form is submitted! So say you pick patient X, change a few of X's address fields, then pick patient Y from the listbox. They want the ability to save X's address info into the database, then autofill the text fields with Y's values.
CodeCharge support's suggestion for this scenario was to create hidden fields for each of the text fields, so that patient X's information is available even if the user has typed new values into the visible text boxes. The problem I'm having is that the autofill feature has already written patient Y's values into the text fields by the time that the listbox's OnChange client side event is called. So I can't get the old X values because autofill has already replaced them.
Does anyone have any ideas about how I might be able to do this - basically I think I need a different event handler that is invoked before autofill has had a chance to overwrite the X textbox values, so that I can grab them, update the database for patient X, then let autofill take over and put patient Y and their values into the form.
--Andrew Lewis
|
 |
 |
datadoit
|
| Posted: 09/17/2008, 5:46 PM |
|
AJAX the whole kit n' kaboodle.
|
|
|
 |
|

|
|
|
|