shaw1ea schrieb: > I want to allow the user to be able to edit data displayed in a > table. Right now I have the typical edit/delete links displayed in > the table row and the user can click on the edit link and the edit > form is displayed allowing the user to edit the data and then save and > return to the table view. Each row of the table has a name and a True/ > False column. It is a hassle to make the user have to use a different > edit form just to change a True/False vale. I have placed check boxes > in the True/False column and would like to allow the user to simply > check the box for True and leave the box unchecked for False. The > check boxes work, but I can not figure out how to update the database > when the user changes a True/False vale by clicking on one of the > check boxes. I added a JQuery function that is called each time a > check box is clicked and this works. I do not know how to update the > database. In the edit form I use the PUT method in the controller and > this works great. If I attempt to put a link and then redirect the > url to the controller PUT method from the get_all page I get the 404 > error resource not found. I do not want to use a new resource, I > want to keep the current page and just update the database without > having to load a new page or a new form. If anyone has any > suggestions or has already found a way to do this please let me know.
You need to invoke a controller-action via AJAX. Invoke that from the onchange-handler on your checkbox. Diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

