[Seaside] onClick vs callback

Tomas Blazej tomas.blazej at gmail.com
Thu Feb 7 11:55:56 UTC 2008


Thank you, "asynchronous: false" worked!

I also found that this happened only in firefox, in IE it works even without
setting it to behave synchronously..

Tomas

2008/2/7, Lukas Renggli <renggli at gmail.com>:
>
> > But I also need some javascript in onClick event generated by evaluator.
>
> This is AJAX and the A is for asynchronous. This means the evaluator
> will return immediately after having set off a request in a background
> thread. If you change to a different page right away, the background
> request is aborted/ignored.
>
> > The problem is, that the javascript code from onClick seems to be
> executed
> > only if I call "return: false" for the evaluator. But in this case, the
> > callback of the button is not run :(
>
> "return: false" tells the browser *not to perform* the callback.
>
> > "return: false" with triggerForm(Element): doesn't work.. Is the answer
> > evaluated before the javascript and then it doesn't make sense or is
> there
> > any other problem..?
>
> You can tell your evaluator not to be asynchronous using
> "asynchronous: false". However consider the comment for this method:
> "Determines whether XMLHttpRequest is used asynchronously or not.
> Since synchronous usage is rather unsettling, and usually bad taste,
> you should avoid changing this. Seriously."
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080207/aa20b753/attachment.htm


More information about the seaside mailing list