On Saturday, December 17, 2011 3:36:59 PM UTC-5, Massimo Di Pierro wrote:
>
> We have this line in web2py.js:
>
> jQuery("input[type='checkbox'].delete", target).live('click',function()
> { if(this.checked) if(!confirm(confirm_message))
> this.checked=false; });
>
Actually, in this case (as with the other event handlers in web2py.js), we 
don't want to use .live, .delegate, or .on. If we use any of those, when 
Ajax components load in the page, they will get two versions of the event 
handler (one from the parent document, and one from their target div). So, 
instead, we should just use:

.click(function() ...

Anthony 

Reply via email to