maybe ;return false; at the end of _onclick (after the alert). false will indicate that the event did not complete and so Javascript will not post/submit.
On Nov 11, 2:54 pm, BrendanC <bren...@gmail.com> wrote: > I'm building a dynamic table with a checkbox in each row with the code > below. The table displays correctly and html looks ok. > However when I click on any checkbox, the page is being submitted - not > sure why. > Any suggestions? > > for item in imgtags: > s = [[item.name , '<input id="%s" />' %item.name]] > chbx = (INPUT( _type='checkbox', _name= 'chk%s' %item.name, > _onclick="alert(this.checked)")) > arr.append ([[item.name],[ chbx]]) > > return XML(TABLE(*[TR(*r) for r in arr], _id = 'tagtable')) > > BrendanC