Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to detect form element change

 
Suresh Kanagalingam
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have a very large form (about 2000 rows, each row with 6 columns). The user can change the information in each cell and submit the changes to the server. Since the data is large I do not want to send all the data back to the server if it is not changed.
I did some test using javascript and I was able to create a hidden field next to a row each time a row got updated (by detecting an event in the cell), but this is a costly operation because I need to update the form with 2000 rows each time when a user changes something.
How can I track row (or cell) changes without updating the form each time when a change is made?
Thanks
Suresh
 
Tom Blough
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Form fields are posted by name. If the field does not have a name, it's value will not be sent. Initially, do not assign a name to the field, but assign an ID instead. Then, in the field's onChange event, assign the id value to the name.

[ December 12, 2003: Message edited by: Tom Blough ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The one thing we do in an application that has a lot of fields is we have a checkbox beside the line of code and when the information is chnage, we check the box. It can be done dynamcially or manually depending on the project.
When we submit the form to our server then we look for just the checked boxes.
Just thought I would guve my 2cents

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic