Hello,

I'm using webgrid in an application and I'm trying to insert an delete 
image into the table to shows all rows in an table. When clicking on the 
delete image I want an onclick event to trigger a Javascript that confirms 
and deletes that row. To do that I need the rownumber. 

Looks like this:
def controller that uses webgrid():
    grid.row_created = add_add_serial_link

def add_add_serial_link(tablerow,rowtype,rowdata):
    if rowtype == 'datarow':

            tablerow.components.insert(2, TD(IMG(_src=URL('static', 
'delete-article.png'), _onclick="confirmation(rowdata.asset_id)", 
_width=15)))

How do I write that _onclick so that the asset_id is sent to the 
confirmation Javascript? If I write 
_onclick='confirmation("rowdata.asset_id")' Javascript gets the text 
rowdata.asset_id and not the ID I'm tryin to send to it.


Kenneth



-- 



Reply via email to