That&#39;s the ticket, RS. Thanks.<br><br><div class="gmail_quote">On Mon, Oct 5, 2009 at 11:45 AM, Robert Sirois <span dir="ltr">&lt;<a href="mailto:watchlala@hotmail.com">watchlala@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div>
Try:<br><br>...<br>onSuccess: (html javascript refresh);<br>...<br><br>I&#39;ve used something similar in the past.<br><br>RS<br><br><hr>From: <a href="mailto:joel.turnbull@ardishealth.com" target="_blank">joel.turnbull@ardishealth.com</a><br>

Date: Mon, 5 Oct 2009 10:47:51 -0400<br>Subject: Re: [Seaside] Degrading Remove Button<br>To: <a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><div><div></div><div class="h5">

<br><br><br>This is working great, Lukas, thank you.<br><br>One more question. What&#39;s the best way to trigger a refresh after the onClick callback?<br><br>My best guess is to add a hidden submit button with an empty callback, and activate it via onSuccess: or onComplete:, but I can&#39;t figure out how to trigger it because triggerFormElement: ignores submit callbacks. Maybe the hidden submit is not even necessary. Here&#39;s where I&#39;m at...<br>



<br>html anchor<br>
     onClick: (html scriptaculous request<br>
        callback: [ self removeItem ];<br>
        confirm: &#39;Are you sure to remove Foo?&#39;;<br>       onSuccess: ( html scriptaculous request triggerFormElement: &#39;hiddenSubmit&#39; );<br>
        return: false);<br>
     callback: [ (self confirm: &#39;Are you sure to remove?&#39;) ifTrue: [<br>
self removeItem ] ];<br>
     with: &#39;remove&#39;<br><br><br><br><br><div>On Fri, Oct 2, 2009 at 12:56 PM, Lukas Renggli <span dir="ltr">&lt;<a href="mailto:renggli@gmail.com" target="_blank">renggli@gmail.com</a>&gt;</span> wrote:<br><blockquote style="padding-left: 1ex;">



Try something along:<br>
<br>
html anchor<br>
     onClick: (html scriptaculous request<br>
        callback: [ self removeItem ];<br>
        confirm: &#39;Are you sure to remove Foo?&#39;;<br>
        return: false);<br>
     callback: [ (self confirm: &#39;Are you sure to remove?&#39;) ifTrue: [<br>
self removeItem ] ];<br>
     with: &#39;remove&#39;<br>
<br>
Lukas<br>
<br>
2009/10/2 Joel Turnbull &lt;<a href="mailto:joel.turnbull@ardishealth.com" target="_blank">joel.turnbull@ardishealth.com</a>&gt;:<br>
<div><div></div><div>&gt;<br>
&gt; I have a remove button that I&#39;d like to pop a js confirmation dialog.<br>
&gt;<br>
&gt; I&#39;d like the button to degrade so that if js is disabled, the user will be<br>
&gt; taken to a separate confirmation page, ala the WAComponent confirm:<br>
&gt;<br>
&gt; Here&#39;s the closest I&#39;ve gotten<br>
&gt;<br>
&gt; html submitButton<br>
&gt;   onClick: &#39;return confirm(&#39;&#39;Are you sure you wish to remove&#39;, aFoo<br>
&gt; name,&#39;?&#39;&#39;)&#39;;<br>
&gt;   callback: [ self confirm: &#39;Are you sure you wish to remove&#39;, aFoo name,&#39;?&#39;<br>
&gt; ];<br>
&gt;   with: each value<br>
&gt;<br>
&gt; The problem with that is, the result of the js confirmation returning true<br>
&gt; is the callback, which is another confirmation.<br>
&gt;<br>
&gt; It seems like I need a separate callback to handle the result of the js<br>
&gt; confim. Is that doable? Any other ideas?<br>
&gt;<br>
&gt; I played around with the WAAsyncComponent onClickCallback: but that didn&#39;t<br>
&gt; seem to do what I expected.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Joel<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
&gt; <a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
<br>
<br>
--<br>
Lukas Renggli<br>
<a href="http://www.lukas-renggli.ch" target="_blank">http://www.lukas-renggli.ch</a><br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</font></blockquote></div><br>                                               <br></div></div><div class="hm"><hr>Hotmail: Free, trusted and rich email service. <a href="http://clk.atdmt.com/GBL/go/171222984/direct/01/" target="_blank">Get it now.</a></div>

</div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br>