I would try moving the code from the callback: block into the load html: block but leave everything else the same as in the original code.<br><br>
<div class="gmail_quote">On Fri, Jul 20, 2012 at 2:22 AM, Joachim Tuchel (objektfabrik) <span dir="ltr"><<a href="mailto:jtuchel@objektfabrik.de" target="_blank">jtuchel@objektfabrik.de</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote"><u></u>
<div>
<p> </p>
<p style="MARGIN:0px"><span><span></span>Paul,</span></p>
<p style="MARGIN:0px"><span> </span></p>
<p style="MARGIN:0px"><span>thanks for answering. </span></p>
<p><span> </span></p>
<p><span>Unfortunately, it doesn'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. Even if I replace the jQuery this with the concrete ID of my list, it doesn't work. </span></p>
<p> </p>
<p>Wouldn't a POST request reload the whole page anyways? </p>
<p> </p>
<p>Joachim </p>
<p style="MARGIN:0px"> </p>
<p style="MARGIN:0px"></p>
<div style="MARGIN:5px 0px"><br>Paul DeBruicker <<a href="mailto:pdebruic@gmail.com" target="_blank">pdebruic@gmail.com</a>> hat am 19. Juli 2012 um 17:11 geschrieben: <br><br>> Hi Joachim, <br>> <br>> I do it like this: <br>
> <br>> (html jQuery post <br>> confirm: 'Do you really want to delete this object?'; <br>> script: [ :s | <br>> self deleteObject: obj. <br>
> s << s jQuery this load html: [:t | self renderListOn: t] ]); <br>> <br>> <br>> The #script: is a script rendering callback that only gets run if the <br>> confirm is confirmed (accepted?). You might have to change the send of <br>
> #this to the specific #id you mean to load into. <br>> <br>> But I'm not sure if its the best way. And would love to learn how to <br>> make it better/safer if there are obvious errors. <br>> <br>> <br>
> <br>> Good luck <br>> <br>> Paul <br>> <br>> <br>> <br>> <br>> <br>> <br>> <br>> On 07/19/2012 05:21 AM, jtuchel wrote: <br>> > Funnily, the code Seaside generates looks as if it does what I want: <br>
> > <br>> > if(confirm("Do you really want to delete this object?")) <br>> > { <br>> > $.ajax({ <br>> > "url":"/MyApp", <br>> > <br>
> > "data":["_s=XON7moFvT7ejEWMY","_k=OBzPflVTFHdzvNyy","20"].join("&"), <br>> > "complete":function(){ <br>> > <br>
> > $(this).load("/MyApp",["_s=XON7moFvT7ejEWMY","_k=OBzPflVTFHdzvNyy","21"].join("&")) <br>> > } <br>> > }) <br>
> > } <br>> > <br>> > I read this as if user clicks OK, call the ajax callback which deletes on <br>> > the server side, and when that is complete, load the contents of the list <br>> > again and have it rendered by the server. <br>
> > <br>> > So maybe I am not really hunting for the complete event, but what else? <br>> > Or is it so that the ajax call to a server side callback does not wait for <br>> > the server side to finish? Does Seaside return an HTTP response immediately? <br>
> > If so, what tricks are there to wait for the server to finish deleting and <br>> > redraw after that? <br>> > <br>> > Thanks for reading <br>> > <br>> > Joachim <br>> > <br>> > -- <br>
> > View this message in context: <a href="http://forum.world.st/Jquery-Ajax-confirm-callback-problem-tp4640695p4640697.html" target="_blank">http://forum.world.st/Jquery-Ajax-confirm-callback-problem-tp4640695p4640697.html</a> <br>
> > Sent from the Seaside General mailing list archive at Nabble.com. <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>> > <br>> <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> </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>