You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Matthew Goodson <go...@gmail.com> on 2010/09/26 23:13:14 UTC

Wicket javascript callback get variable

Hi guys,
I'm trying to call wicket from javascript. I have figured out how to do this
but its not quite behaving as I expect. On the code below I would expect the
success handler (alert('first')) to be fired before the alert('second') but
this doesn't prove to be the case.

wicketAjaxPost('"+behave.getCallbackUrl()+"', function() {alert('first');},
function() { });
if (blah == true) {
 alert('second');
}

Can anyone explain this to me? What I'm ultimately trying to do is do a
callback to wicket and retrieve a string variable but that variable has to
be accessible to the lines below the wicketAjxPost.
Thanks!