<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Try:<br><br>...<br>onSuccess: (html javascript refresh);<br>...<br><br>I've used something similar in the past.<br><br>RS<br><br><hr id="stopSpelling">From: joel.turnbull@ardishealth.com<br>Date: Mon, 5 Oct 2009 10:47:51 -0400<br>Subject: Re: [Seaside] Degrading Remove Button<br>To: seaside@lists.squeakfoundation.org<br><br><br>This is working great, Lukas, thank you.<br><br>One more question. What'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't figure out how to trigger it because triggerFormElement: ignores submit callbacks. Maybe the hidden submit is not even necessary. Here's where I'm at...<br>

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

Try something along:<br>
<br>
html anchor<br>
 &nbsp; &nbsp; onClick: (html scriptaculous request<br>
 &nbsp; &nbsp; &nbsp; &nbsp;callback: [ self removeItem ];<br>
 &nbsp; &nbsp; &nbsp; &nbsp;confirm: 'Are you sure to remove Foo?';<br>
 &nbsp; &nbsp; &nbsp; &nbsp;return: false);<br>
 &nbsp; &nbsp; callback: [ (self confirm: 'Are you sure to remove?') ifTrue: [<br>
self removeItem ] ];<br>
 &nbsp; &nbsp; with: 'remove'<br>
<br>
Lukas<br>
<br>
2009/10/2 Joel Turnbull &lt;<a href="mailto:joel.turnbull@ardishealth.com">joel.turnbull@ardishealth.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt;<br>
&gt; I have a remove button that I'd like to pop a js confirmation dialog.<br>
&gt;<br>
&gt; I'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's the closest I've gotten<br>
&gt;<br>
&gt; html submitButton<br>
&gt; &nbsp; onClick: 'return confirm(''Are you sure you wish to remove', aFoo<br>
&gt; name,'?'')';<br>
&gt; &nbsp; callback: [ self confirm: 'Are you sure you wish to remove', aFoo name,'?'<br>
&gt; ];<br>
&gt; &nbsp; 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'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">seaside@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">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">http://www.lukas-renggli.ch</a><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">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</font></blockquote></div><br>                                               <br /><hr />Hotmail: Free, trusted and rich email service. <a href='http://clk.atdmt.com/GBL/go/171222984/direct/01/' target='_new'>Get it now.</a></body>
</html>