Re: confirmation javascript in ajaxformloop

2011-06-30 Thread Ernesto Badillo
Thanks a lot! Very simple workaround. I don't know why it didn't occur to me. On Thu, Jun 30, 2011 at 1:22 PM, Kalle Korhonen wrote: > This has been discussed a few times. The right way would be to use > event propagation as intended, for example: > Remove > > Then add a handler for the nested el

Re: confirmation javascript in ajaxformloop

2011-06-30 Thread Kalle Korhonen
This has been discussed a few times. The right way would be to use event propagation as intended, for example: Remove Then add a handler for the nested element: Event.observe($('confirmRemoval'), 'click', function(event) {if (!confirm('are you sure to want to remove?')) event.stop();}); to stop th

confirmation javascript in ajaxformloop

2011-06-30 Thread Ernesto Badillo
Hi, I was trying to add a small script asking for confirmation before removing an element contained in the ajaxformloop component. The first thing I tried was the following: Remove This doesn't work becasue this component's onclick handler is called first and thus it is not possible to stop the