_onclick expects a javascript fragment to be executed.
On Monday, November 19, 2012 2:40:24 PM UTC+1, Amit wrote:
>
> Hi,
> I have added one custom button after *Search* and *Clear* buttons of
> SQLFORM.grid but unable to associate the action onto it, onclick is not
> getting called.Please see below the code:
>
> grid = SQLFORM.grid(db.test_table,deletable=True)
> grid[0][1][1].components = [
> TAG.button('testbutton', _id="px-delete",_type="button",_onclick=
> 'test')
> ]
>
> def test():
> print 'test called'
>
> "testbutton" is getting added perfectly but when i click on it , it
> doesn't call test() function, how to achieve it? Please do help me.
>
>
--