<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div class="" style=""><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">Joachim,</span><br style=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">In answer to your questions: </span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;
background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br class="" style=""></span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">* Are you sure the callback isn't executed? Did you check with Browser <br clear="none" class="" style="">tools if a request is sent to the server?</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span
class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br class="" style=""></span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">Yes. We can very clearly see that the onClick: event is triggered on the browser but that no callback: is done.</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica,
Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br clear="none" class="" style="">* Does a server side breakpoint in the callback method fire?</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br class="" style=""></span></span></div><div class="" style="background-color: transparent;"><font face="Helvetica Neue, Segoe UI, Helvetica, Arial, Lucida Grande, sans-serif" size="2" class="" style="">A Transcript message in WACallbackRegistry>>handle: shows that it is not being sent. </font><br class="" style=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe
UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br clear="none" class="" style="">* Is it some obscure ancient Browser version (think IE 8 and below) in <br clear="none" class="" style="">which this happens?</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br class="" style=""></span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida
Grande', sans-serif; font-style: normal; background-color: transparent;">I test with Chrome (latest version), but I've seen the behaviour in Firefox as well (also latest version).</div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br clear="none" class="" style="">* Is your onClick: handler more complex than your shown snippet? Does it <br clear="none" class="" style="">return false or call preventDefault() ? This would be the only <br clear="none" class="" style="">explanation I can see for the callback not executing.</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI',
Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br class="" style=""></span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">No. The code is exactly what we used.</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family:
'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br clear="none" class="" style="">* If these hints don't help, try debugging the resulting Javascript on <br clear="none" class="" style="">your Browser. All current browsers have quite nice tools for debugging <br clear="none" class="" style="">javascript. The only difficulty here is that it's sometimes hard to find <br clear="none" class="" style="">and debug js code that was generated by Seaside, because the code is <br clear="none" class="" style="">inserted somewhere in the middle of the html page rather than the onLoad <br clear="none" class="" style="">at the end of the document.<br class="" style=""></span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color:
transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br class="" style=""></span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">Here is what I see... (a simple link to show 'Project')</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif;
font-size: 13px;" class=""><br class="" style=""></span></span></div><div class="" style="background-color: transparent;"><span class="" style=""><span class="" style=""><font face="Helvetica Neue, Segoe UI, Helvetica, Arial, Lucida Grande, sans-serif" size="2" class="" style=""><a id="id513" onclick="$(&quot;#busy&quot;).show(300)" href="/portal?_s=WKDLJE12tAQicU1u&amp;_k=xlDl3htKPumY6l-A&amp;514" class="ui-draggable" style="position: relative;">Projects</a></font><br class="" style=""></span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><br class="" style=""></span></span></div><div class="" style="color:
rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">Thanks for the comments,</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">Bob</span></span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"
class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" class=""> <div dir="ltr" class="" style=""> <font size="2" face="Arial" class="" style=""> On Tuesday, November 11, 2014 1:56 AM, "jtuchel@objektfabrik.de" <jtuchel@objektfabrik.de> wrote:<br class="" style=""> </font> </div> <br class="" style=""><br class="" style=""> <div class="" style="">Paul, Bob,<br clear="none" class="" style=""><br clear="none" class="" style="">as far as I understand, Bob's problem is not related to #onAjaxStart:, <br clear="none" class="" style="">because there is no Ajax request in his code example, just a simple <br clear="none" class="" style="">callback. So what you suggest would show a spinner on each Ajax call, <br clear="none" class="" style="">but it will not fix the issue at hand, which is that the callback is not <br clear="none" class="" style="">called.<br clear="none" class=""
style="">Or are you saying onAjaxStart: will also be executed for "normal" <br clear="none" class="" style="">callbacks like anchors and submit buttons? My understanding is it is <br clear="none" class="" style="">only executed in the context of an XMLHTTPRequest...?<br clear="none" class="" style=""><br clear="none" class="" style="">The described behavior, however, is really strange. In the snippet you <br clear="none" class="" style="">show, there is nothing that would prevent the Browser from handling the <br clear="none" class="" style="">user's click on the link. So if your code snippet really is the <br clear="none" class="" style="">production code, I do not see anything that would explain why in some <br clear="none" class="" style="">cases there is no callback processing. So I don't really have an instant <br clear="none" class="" style="">answer, just a few ideas:<br clear="none" class="" style=""><br clear="none" class="" style="">* Are you
sure the callback isn't executed? Did you check with Browser <br clear="none" class="" style="">tools if a request is sent to the server?<br clear="none" class="" style="">* Does a server side breakpoint in the callback method fire?<br clear="none" class="" style="">* Is it some obscure ancient Browser version (think IE 8 and below) in <br clear="none" class="" style="">which this happens?<br clear="none" class="" style="">* Is your onClick: handler more complex than your shown snippet? Does it <br clear="none" class="" style="">return false or call preventDefault() ? This would be the only <br clear="none" class="" style="">explanation I can see for the callback not executing.<br clear="none" class="" style="">* If these hints don't help, try debugging the resulting Javascript on <br clear="none" class="" style="">your Browser. All current browsers have quite nice tools for debugging <br clear="none" class="" style="">javascript. The only difficulty
here is that it's sometimes hard to find <br clear="none" class="" style="">and debug js code that was generated by Seaside, because the code is <br clear="none" class="" style="">inserted somewhere in the middle of the html page rather than the onLoad <br clear="none" class="" style="">at the end of the document.<br clear="none" class="" style=""><br clear="none" class="" style="">HTH,<br clear="none" class="" style=""><br clear="none" class="" style="">Joachim<br clear="none" class="" style=""><br clear="none" class="" style="">Am 10.11.14 um 17:12 schrieb Paul DeBruicker:<br clear="none" class="" style="">> Hi Bob,<br clear="none" class="" style="">><br clear="none" class="" style="">> Using the #onAjaxStart: & #onAjaxStop: setting as discussed here:<br clear="none" class="" style="">> <a shape="rect" href="http://forum.world.st/JQAutocomplete-and-onAjaxStart-td4787505.html" target="_blank" class=""
style="">http://forum.world.st/JQAutocomplete-and-onAjaxStart-td4787505.html </a>to<br clear="none" class="" style="">> trigger the busy spinner may fix your issue because it would wait for the<br clear="none" class="" style="">> request to be sent from the client to start the spinner, rather than the<br clear="none" class="" style="">> click.<br clear="none" class="" style="">><br clear="none" class="" style="">><br clear="none" class="" style="">><br clear="none" class="" style="">><br clear="none" class="" style="">> Paul<br clear="none" class="" style="">><br clear="none" class="" style="">><br clear="none" class="" style="">><br clear="none" class="" style="">><br clear="none" class="" style="">> Bob Nemec wrote<br clear="none" class="" style="">>> We like to show a 'busy' spinner image when a user clicks on a link.<br clear="none" class="" style="">>> Years ago we added code like this...<br
clear="none" class="" style="">>><br clear="none" class="" style="">>> ...<br clear="none" class="" style="">>>> onClick: ((canvas jQuery id: 'busy') show: 0.3 seconds);<br clear="none" class="" style="">>>> callback: [some action]<br clear="none" class="" style="">>>> ...<br clear="none" class="" style="">>> ...which works fine, except that sometimes the onClick: action gets<br clear="none" class="" style="">>> triggered without the callback:<br clear="none" class="" style="">>> The user then sees the 'busy' image, but the view does not change. They<br clear="none" class="" style="">>> think the system has locked up.<br clear="none" class="" style="">>> I've tried various ajax / onSuccess: mixes, but nothing works exactly<br clear="none" class="" style="">>> right.<br clear="none" class="" style="">>><br clear="none" class="" style="">>> What would be a good way to
ensure that 'busy' is shown only if the<br clear="none" class="" style="">>> callback: block is triggered?<br clear="none" class="" style="">>><br clear="none" class="" style="">>> Thanks for any help,<br clear="none" class="" style="">>><br clear="none" class="" style="">>> Bob Nemec<br clear="none" class="" style="">>> HTS<br clear="none" class="" style="">>> _______________________________________________<br clear="none" class="" style="">>> seaside mailing list<br clear="none" class="" style="">>> <a shape="rect" ymailto="mailto:seaside@.squeakfoundation" href="mailto:seaside@.squeakfoundation" class="" style="">seaside@.squeakfoundation</a><br clear="none" class="" style="">>> <a shape="rect" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" class="" style="">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br clear="none"
class="" style="">><br clear="none" class="" style="">><br clear="none" class="" style="">><br clear="none" class="" style="">><br clear="none" class="" style="">> --<br clear="none" class="" style="">> View this message in context: <a shape="rect" href="http://forum.world.st/onClick-plus-callback-tp4789445p4789502.html" target="_blank" class="" style="">http://forum.world.st/onClick-plus-callback-tp4789445p4789502.html</a><br clear="none" class="" style="">> Sent from the Seaside General mailing list archive at Nabble.com.<br clear="none" class="" style="">> _______________________________________________<br clear="none" class="" style="">> seaside mailing list<br clear="none" class="" style="">> <a shape="rect" ymailto="mailto:seaside@lists.squeakfoundation.org" href="mailto:seaside@lists.squeakfoundation.org" class="" style="">seaside@lists.squeakfoundation.org</a><br clear="none" class="" style="">> <a shape="rect"
href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" class="" style="">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br clear="none" class="" style="">><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style="">-- <br clear="none" class="" style="">-----------------------------------------------------------------------<br clear="none" class="" style="">Objektfabrik Joachim Tuchel mailto:<a shape="rect" ymailto="mailto:jtuchel@objektfabrik.de" href="mailto:jtuchel@objektfabrik.de" class="" style="">jtuchel@objektfabrik.de</a><br clear="none" class="" style="">Fliederweg 1 <a shape="rect" href="http://www.objektfabrik.de/" target="_blank" class="" style="">http://www.objektfabrik.de</a><br clear="none" class="" style="">D-71640
Ludwigsburg <a shape="rect" href="http://joachimtuchel.wordpress.com/" target="_blank" class="" style="">http://joachimtuchel.wordpress.com</a><br clear="none" class="" style="">Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1<div class="" id="yqtfd42866" style=""><br clear="none" class="" style=""><br clear="none" class="" style="">_______________________________________________<br clear="none" class="" style="">seaside mailing list<br clear="none" class="" style=""><a shape="rect" ymailto="mailto:seaside@lists.squeakfoundation.org" href="mailto:seaside@lists.squeakfoundation.org" class="" style="">seaside@lists.squeakfoundation.org</a><br clear="none" class="" style=""><a shape="rect" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" class=""
style="">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br clear="none" class="" style=""></div><br class="" style=""><br class="" style=""></div> </div> </div> </div> </div></body></html>