On Saturday, January 25, 2014 2:13:21 PM UTC-5, horridohobbyist wrote:
>
> How can I trigger JS code from a delete operation? Anything in the view or
> controller would not know (and would not be notified) that SQLFORM.grid had
> just performed a delete.
>
When a delete is performed, an ajax request is sent to the grid's
controller function, so you could do:
def mycontroller:
grid = SQLFORM.grid(...)
if 'delete' in request.args:
total = ...
response.js = "jQuery('#total').html('%s');" % total
> BTW, client_side_delete is not recognized and generates a ticket.
>
Was probably added in a later version than 2.4.2.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.