I have a page with a table.
Some rows have a particular control; clicking on it sends an ajax request which
modifies the database record relating to that particular row. The row is
identified in the control's "onclick" by passing the unique identifier to the
click handler.
I want the response to the request to be able to locate and modify the original
control.
What are people's opinions on the 'best' way to track which control it is?
The ideas I've had are:
* Send $(".control_class").index($(this)) with the request, get the server-side
script to return it then use $(".control_class").get($control_index)
* Insert <input type='hidden' name='control_id' value='UNIQUE_ID' /> as a
sibling of the control to be modified. On response, use $("[EMAIL PROTECTED]")
Out of these two, the first seems far better, but involving the server-side
script in client-side operations seems a little messy.
Any other ideas?
Thanks!
Rob
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/