[Seaside] Re: onClick: plus callback:
jtuchel at objektfabrik.de
jtuchel at objektfabrik.de
Tue Nov 11 06:55:44 UTC 2014
as far as I understand, Bob's problem is not related to #onAjaxStart:,
because there is no Ajax request in his code example, just a simple
callback. So what you suggest would show a spinner on each Ajax call,
but it will not fix the issue at hand, which is that the callback is not
Or are you saying onAjaxStart: will also be executed for "normal"
callbacks like anchors and submit buttons? My understanding is it is
only executed in the context of an XMLHTTPRequest...?
The described behavior, however, is really strange. In the snippet you
show, there is nothing that would prevent the Browser from handling the
user's click on the link. So if your code snippet really is the
production code, I do not see anything that would explain why in some
cases there is no callback processing. So I don't really have an instant
answer, just a few ideas:
* Are you sure the callback isn't executed? Did you check with Browser
tools if a request is sent to the server?
* Does a server side breakpoint in the callback method fire?
* Is it some obscure ancient Browser version (think IE 8 and below) in
which this happens?
* Is your onClick: handler more complex than your shown snippet? Does it
return false or call preventDefault() ? This would be the only
explanation I can see for the callback not executing.
your Browser. All current browsers have quite nice tools for debugging
and debug js code that was generated by Seaside, because the code is
inserted somewhere in the middle of the html page rather than the onLoad
at the end of the document.
Am 10.11.14 um 17:12 schrieb Paul DeBruicker:
> Hi Bob,
> Using the #onAjaxStart: & #onAjaxStop: setting as discussed here:
> http://forum.world.st/JQAutocomplete-and-onAjaxStart-td4787505.html to
> trigger the busy spinner may fix your issue because it would wait for the
> request to be sent from the client to start the spinner, rather than the
> Bob Nemec wrote
>> We like to show a 'busy' spinner image when a user clicks on a link.
>> Years ago we added code like this...
>>> onClick: ((canvas jQuery id: 'busy') show: 0.3 seconds);
>>> callback: [some action]
>> ...which works fine, except that sometimes the onClick: action gets
>> triggered without the callback:
>> The user then sees the 'busy' image, but the view does not change. They
>> think the system has locked up.
>> I've tried various ajax / onSuccess: mixes, but nothing works exactly
>> What would be a good way to ensure that 'busy' is shown only if the
>> callback: block is triggered?
>> Thanks for any help,
>> Bob Nemec
>> seaside mailing list
>> seaside at .squeakfoundation
> View this message in context: http://forum.world.st/onClick-plus-callback-tp4789445p4789502.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> seaside mailing list
> seaside at lists.squeakfoundation.org
Objektfabrik Joachim Tuchel mailto:jtuchel at objektfabrik.de
Fliederweg 1 http://www.objektfabrik.de
D-71640 Ludwigsburg http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1
More information about the seaside