[Seaside] jQuery Ajax: do something before and after

jtuchel jtuchel at objektfabrik.de
Tue Jan 22 16:30:09 UTC 2013


I am trying to do something pretty simple (I thought):
I want to show some wait dialog or replace a submit button with a spinning
wheel and the text 'please wait' until the ajax has finished.

For this I did something like this in my code

s submitButton
  onClick:  (
				s jQuery ajax
					onBeforeSend: (((s jQuery class: 'submit')  hide)); 
					callback: [self doSomething];
					onComplete: ((s jQuery class: 'submit')  show));
  with: 'Click here'.

I tried to open a jQuery dialog in the beforeSend and closing it in
complete, but this either doesnt work at all or only in one of FF and
Chrome, but never in both.

How do people solve this "easy" task?


View this message in context: http://forum.world.st/jQuery-Ajax-do-something-before-and-after-tp4664568.html
Sent from the Seaside General mailing list archive at Nabble.com.

More information about the seaside mailing list