Hello everybody,

I'm struggling with this right here. I want to pass an id from view to a 
controller function so I can delete a record from database.
So far this is what I got.
I would appreciate some light on this because I don't know what I'm doing 
wrong.

Thanks!

view
$('#warning').on('click', function(){
    var iduser= $('#id').val();
    ajax('{{=URL('Tools', 'userdelete', args=)}}' , [], iduser);
})

controller (Tools.py)
def userdelete():
    rec-id = request.args(0)
    crud.delete(db.People, rec-id, message=T('Deleted'))




-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/95f145c0-8f1b-4444-ab0b-10898798b3af%40googlegroups.com.

Reply via email to