[Seaside] Re: Jquery Ajax confirm: callback problem

jtuchel jtuchel at objektfabrik.de
Thu Jul 19 12:21:39 UTC 2012


Funnily, the code Seaside generates looks as if it does what I want:

if(confirm("Do you really want to delete this object?"))
{
	$.ajax({
		"url":"/MyApp",
               
"data":["_s=XON7moFvT7ejEWMY","_k=OBzPflVTFHdzvNyy","20"].join("&"),
		"complete":function(){
		
$(this).load("/MyApp",["_s=XON7moFvT7ejEWMY","_k=OBzPflVTFHdzvNyy","21"].join("&"))
			}
		})
}

I read this as if user clicks OK, call the ajax callback which deletes on
the server side, and when that is complete, load the contents of the list
again and have it rendered by the server.

So maybe I am not really hunting for the complete event, but what else? 
Or is it so that the ajax call to a server side callback does not wait for
the server side to finish? Does Seaside return an HTTP response immediately?
If so, what tricks are there to wait for the server to finish deleting and
redraw after that?

Thanks for reading

Joachim

--
View this message in context: http://forum.world.st/Jquery-Ajax-confirm-callback-problem-tp4640695p4640697.html
Sent from the Seaside General mailing list archive at Nabble.com.


More information about the seaside mailing list