http://web2py.com/books/default/search/29?search=FORM.confirm
On Tuesday, 18 September 2012 07:10:42 UTC-5, Johann Spies wrote: > > On 18 September 2012 12:50, Mandar Vaze <manda...@gmail.com > <javascript:>>wrote: > >> Hi, >> >> I'm using "selectable=True" in the sqlform.grid. This shows a checkbox in >> first column for all the rows "except the header" >> >> 2. I also get "Submit Query" button below the table. I've managed to >> rename this to "Delete Selected" - Is there a way to show a confirmation >> dialog like "Are you sure you want to delete all the selected entries" (or >> some such) - before the records are deleted ? >> >> > I use this: > > bevestig = T('Are you sure you want to delete the selected > articles?') > try: > form.element('.web2py_table input[type=submit]')['_value'] = > T('Delete selected articles') > form.element('.web2py_table input[type=submit]')['_onclick'] = > "return confirm ('%s')" % bevestig > except: > pass > > > Regards > Johann > > -- > Because experiencing your loyal love is better than life itself, > my lips will praise you. (Psalm 63:3) > > --