<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
 </head><body>
 
 
  <p>&#160;</p> 
  <p style="margin: 0;"><span><span></span>Paul,</span></p> 
  <p style="margin: 0;"><span>&#160;</span></p> 
  <p style="margin: 0px; "><span>thanks for answering. </span></p> 
  <p><span>&#160;</span></p> 
  <p><span>Unfortunately, it doesn&#39;t work for me. It leaves me with a blank page on Chrome and a text-only page containing teh html of the complete page re-rendered.&#160; Even if I replace the jQuery this with the concrete ID of my list, it doesn&#39;t work.&#160;</span></p> 
  <p>&#160;</p> 
  <p>Wouldn&#39;t a POST request reload the whole page anyways?&#160; &#160;</p> 
  <p>&#160;</p> 
  <p>Joachim&#160;</p> 
  <p style="margin: 0px; ">&#160;</p> 
  <p style="margin: 0px; "></p> 
  <div style="margin: 5px 0px 5px 0px;">
   <br/>Paul DeBruicker &#60;pdebruic@gmail.com&#62; hat am 19. Juli 2012 um 17:11 geschrieben:
   <br/>
   <br/>&#62; Hi Joachim,
   <br/>&#62; 
   <br/>&#62; I do it like this:
   <br/>&#62; 
   <br/>&#62;&#160; &#160; &#160; &#160; &#160;(html jQuery post
   <br/>&#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;confirm: &#39;Do you really want to delete this object?&#39;;
   <br/>&#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;script: [ :s |
   <br/>&#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;self deleteObject: obj.
   <br/>&#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;s &#60;&#60; s jQuery this load html: [:t | self renderListOn: t] ]);
   <br/>&#62;&#160; &#160; &#160; &#160; &#160;
   <br/>&#62; 
   <br/>&#62; The #script: is a script rendering callback that only gets run if the 
   <br/>&#62; confirm is confirmed (accepted?).&#160; You might have to change the send of 
   <br/>&#62; #this to the specific #id you mean to load into.
   <br/>&#62; 
   <br/>&#62; But I&#39;m not sure if its the best way.&#160; And would love to learn how to 
   <br/>&#62; make it better/safer if there are obvious errors.
   <br/>&#62; 
   <br/>&#62; 
   <br/>&#62; 
   <br/>&#62; Good luck
   <br/>&#62; 
   <br/>&#62; Paul
   <br/>&#62; 
   <br/>&#62; 
   <br/>&#62; 
   <br/>&#62; 
   <br/>&#62; 
   <br/>&#62; 
   <br/>&#62; 
   <br/>&#62; On 07/19/2012 05:21 AM, jtuchel wrote:
   <br/>&#62; &#62; Funnily, the code Seaside generates looks as if it does what I want:
   <br/>&#62; &#62;
   <br/>&#62; &#62; if(confirm(&#34;Do you really want to delete this object?&#34;))
   <br/>&#62; &#62; {
   <br/>&#62; &#62;&#160; &#160; &#160; &#160; &#160;$.ajax({
   <br/>&#62; &#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#34;url&#34;:&#34;/MyApp&#34;,
   <br/>&#62; &#62;
   <br/>&#62; &#62; &#34;data&#34;:[&#34;_s=XON7moFvT7ejEWMY&#34;,&#34;_k=OBzPflVTFHdzvNyy&#34;,&#34;20&#34;].join(&#34;&#38;&#34;),
   <br/>&#62; &#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#34;complete&#34;:function(){
   <br/>&#62; &#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;
   <br/>&#62; &#62; $(this).load(&#34;/MyApp&#34;,[&#34;_s=XON7moFvT7ejEWMY&#34;,&#34;_k=OBzPflVTFHdzvNyy&#34;,&#34;21&#34;].join(&#34;&#38;&#34;))
   <br/>&#62; &#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;}
   <br/>&#62; &#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;})
   <br/>&#62; &#62; }
   <br/>&#62; &#62;
   <br/>&#62; &#62; I read this as if user clicks OK, call the ajax callback which deletes on
   <br/>&#62; &#62; the server side, and when that is complete, load the contents of the list
   <br/>&#62; &#62; again and have it rendered by the server.
   <br/>&#62; &#62;
   <br/>&#62; &#62; So maybe I am not really hunting for the complete event, but what else?
   <br/>&#62; &#62; Or is it so that the ajax call to a server side callback does not wait for
   <br/>&#62; &#62; the server side to finish? Does Seaside return an HTTP response immediately?
   <br/>&#62; &#62; If so, what tricks are there to wait for the server to finish deleting and
   <br/>&#62; &#62; redraw after that?
   <br/>&#62; &#62;
   <br/>&#62; &#62; Thanks for reading
   <br/>&#62; &#62;
   <br/>&#62; &#62; Joachim
   <br/>&#62; &#62;
   <br/>&#62; &#62; --
   <br/>&#62; &#62; View this message in context: http://forum.world.st/Jquery-Ajax-confirm-callback-problem-tp4640695p4640697.html
   <br/>&#62; &#62; Sent from the Seaside General mailing list archive at Nabble.com.
   <br/>&#62; &#62; _______________________________________________
   <br/>&#62; &#62; seaside mailing list
   <br/>&#62; &#62; seaside@lists.squeakfoundation.org
   <br/>&#62; &#62; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
   <br/>&#62; &#62;
   <br/>&#62; 
   <br/>&#62; _______________________________________________
   <br/>&#62; seaside mailing list
   <br/>&#62; seaside@lists.squeakfoundation.org
   <br/>&#62; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
  </div> 
 
</body></html>