Link to home
Start Free TrialLog in
Avatar of basirana
basirana

asked on

get change textbox value only

Hi

I have a senario where I am try to get values from 100 records and each record has 10 columns (10 values).
form look like grid layout with 10 columns and 100 rows.
Problem is when values are retrived and displayed in the form most of them are null. and user will update the values from the form.
Everytime when user clicks on update 100 records will be getting updated. but let say user changes only 2 records(rows) and clicks on update it will send 100 records(1000 values to database) and number of changes 2 records(20 values).
This will make process slow.
My question is there anyway I can save only the changed values and update the records insted of sending all values.

capture changes and update database.

Thanks
Avatar of Weiping Du
Weiping Du
Flag of United States of America image

You may need to implement AJAX into your code.  There are demo and some sample codes at this links  http://ajaxtags.no-ip.info/  
You also can easily find other AJAX Sample applications on Web.
Avatar of jaggernat
jaggernat

>>>>. but let say user changes only 2 records(rows) and clicks on update it will send 100 records

Change the backend logic .i.e. once the user changes(updates) the fields in front-end, in the database, update  only those fields which were Changed in front-end. Those fields which were not changed , should not be updated in database.
you can use a hidden form field on every record and then use java script to update this value when user changes anything on the record.
at the back end you can check this hidden field to determine which records needs updation in the database...
true, just like setting a flag for the field!
:-) I have used this trick more than I can care to remember.
Avatar of basirana

ASKER

Can I get example how can capture changes
ASKER CERTIFIED SOLUTION
Avatar of Kuldeepchaturvedi
Kuldeepchaturvedi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial