thanks geoff,

your last post where you put the confirm mixin on a <span> within the <a> is interesting .. wouldn't that be rendered as the equivalent of:

<a ....><span onclick="return confirm('?');">text</span></a>

or at least the prototypesque version of this:

<a ....><span id="spanId">text</span></a>
Event.observe($("spanId"), 'click', function(e){if (!confirm('?')) e.stop();});

i have tried both of these approaches but neither cancel the event on the <a>... if yours works what is the fundamental difference?

regards, p.

Geoff Callender wrote:
http://tapestry-users.832.n2.nabble.com/Confirm-mixin-won-t-cancel-when-in-zone-td5048950.html#a5048950

On 13/07/2010, at 12:31 PM, Paul Stanton wrote:

Hi all,

I was hoping to be able to use a simple js confirm in order to (conditionally) 
cancel the callback from an async event link:

<a t:type="eventLink" event="DeleteRecord" context="record.id" zone="myZone" onclick="return 
confirm('sure?');">delete</a>

Unfortunately, even when 'Cancel' is clicked, the callback is executed.

What is the simplest way to add one stage of logic to this process?

Thanks, Paul.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


Reply via email to