<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Johan,<br>
      <br>
      I was referring to the timeout: parameter of $.ajax() which is not
      supported by .load() (see here:
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/16129292/how-do-i-set-a-timeout-in-load-jquery-for-this-particular-example">http://stackoverflow.com/questions/16129292/how-do-i-set-a-timeout-in-load-jquery-for-this-particular-example</a>).<br>
      <br>
      But the wrapping of the load()-call within a setTimout() works
      perfectly. So your suggestion of  "addDecoration: (JSTimeout
      duration: aDuration)" works perfectly!<br>
      <br>
      <br>
      So you taught me at least 3 important lessons today:<br>
      <br>
      1. I can addLoadScript: in an ajax callback<br>
      2. addDecoration: in JSObjects to wrap stuff into a function <br>
      3. The handling of Ajax Callbacks on the Seaside Server blocks
      "normal" callbacks (I know of no better way to name it)<br>
      <br>
      <br>
      We now have a dashboard that reacts to clicks immediately. <br>
      There is one thing with a bitter taste for now: the server side
      Ajax processing is not stopped, so the background process still
      burns cycles although nobody is interested in its results any
      more. It should be easy to do this, because it is just a question
      of terminating background processes and keep track of what
      background processes are currently running for this session.
      Combined with another Ajax call and a bit of bookeeping we'll be
      able to save cycles should the need arise. For now we just enjoy
      the improvements ;-)<br>
      <br>
      Thanks for great help!<br>
      <br>
      Joachim<br>
      <br>
      <br>
      <br>
      Am 21.11.15 um 09:14 schrieb Johan Brichau:<br>
    </div>
    <blockquote
      cite="mid:4D5AA438-A938-4394-B058-D75800007379@inceptive.be"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      Hi Joachim,
      <div class=""><br class="">
      </div>
      <div class="">I’m not really sure what “timeout” you are referring
        to, but your reply makes me think of an issue (see below).</div>
      <div class="">The timeout method I used in my code snippet
        corresponds to JavaScript’s setTimeout function wrapped around
        the ajax request. So, in that sense, any JS expression supports
        that.</div>
      <div class=""><br class="">
      </div>
      <div class="">BUT, an issue regarding the #timeout: message pops
        to my mind:</div>
      <div class=""><br class="">
      </div>
      <div class="">There are two unrelated implementations of the
        #timeout: message. The one on (JSObject&gt;&gt;timeout:) is to
        wrap a JS statement in a setTimeout function, the other one on
        (JQAjaxSetup&gt;&gt;timeout:) is to set a timeout value for the
        ajax request. Unfortunately, the latter overrides the former. I
        suspect that the code I sent you hits that issue. You can solve
        it by sending "addDecoration: (JSTimeout duration: aDuration)”
        instead of #timeout:.</div>
      <div class=""><br class="">
      </div>
      <div class="">I got bitten by this before. I ignored it (working
        around it by using #addDecoration:). A colleague of mine got
        bitten just a couple of weeks ago. I think you got bitten too
        now.</div>
      <div class="">I think I should no longer ignore this unpolymorphic
        override anymore :/ [1]</div>
      <div class=""><br class="">
      </div>
      <div class="">[1] <a moz-do-not-send="true"
          href="https://github.com/SeasideSt/Seaside/issues/861"
          class="">https://github.com/SeasideSt/Seaside/issues/861</a></div>
      <div class=""><br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">On 20 Nov 2015, at 10:07, jtuchel &lt;<a
                moz-do-not-send="true"
                href="mailto:jtuchel@objektfabrik.de" class=""><a class="moz-txt-link-abbreviated" href="mailto:jtuchel@objektfabrik.de">jtuchel@objektfabrik.de</a></a>&gt;
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <div class="moz-cite-prefix" style="font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant: normal; font-weight: normal;
                letter-spacing: normal; orphans: auto; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; widows: auto; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;">Johan,<br class="">
                <br class="">
                thanks a lot for this idea and code draft. It is of
                course exactly what I need.<span
                  class="Apple-converted-space"> </span><br class="">
                <br class="">
                Given that we use that background process thing at
                another place (show a progress dialog for a long running
                process), it is sad but trrue I didn't think of the same
                technique for this purpose. But of course this is the
                perfect thing to do. Thus the Ajax's will be short
                running and the browser won't wait for the data.
                Definitely worth it.<br class="">
                <br class="">
                Once again: thanks a lot for your guidance and help! I
                still hope one day I can give something back.<br
                  class="">
                <br class="">
                Maybe a drink in Prague at ESUG 2016 counts as a first
                attempt? ;-)<br class="">
                <br class="">
                Joachim<br class="">
                <br class="">
                <br class="">
                <br class="">
                Am 20.11.15 um 09:52 schrieb Johan Brichau-2 [via
                Smalltalk]:<br class="">
              </div>
              <blockquote
                cite="mid:A842D58A-065B-40BE-B517-66D09C5485D9@inceptive.be"
                type="cite" style="font-family: Helvetica; font-size:
                12px; font-style: normal; font-variant: normal;
                font-weight: normal; letter-spacing: normal; orphans:
                auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                border-left-width: 2px; border-left-style: solid;
                border-left-color: rgb(204, 204, 204); padding: 0px
                1em;" class=""><br class="">
                <div class="">
                  <blockquote type="cite" class=""
                    style="border-left-width: 2px; border-left-style:
                    solid; border-left-color: rgb(204, 204, 204);
                    padding: 0px 1em;">
                    <div class="">On 20 Nov 2015, at 09:57, Johan
                      Brichau &lt;<a moz-do-not-send="true"
                        href="x-msg://11/user/SendEmail.jtp?type=node&amp;node=4862164&amp;i=0"
                        target="_top" rel="nofollow" link="external"
                        class="">[hidden email]</a>&gt; wrote:</div>
                    <br class="Apple-interchange-newline">
                    <div class="">
                      <div class="" style="font-family: Helvetica;
                        font-size: 12px; font-style: normal;
                        font-variant: normal; font-weight: normal;
                        letter-spacing: normal; orphans: auto;
                        text-align: start; text-indent: 0px;
                        text-transform: none; white-space: normal;
                        widows: auto; word-spacing: 0px;
                        -webkit-text-stroke-width: 0px;">
                        <div class="">This perfectly fits your
                          decoration implementation. Something along
                          these lines (disclaimer: untested code written
                          in email client :) :</div>
                      </div>
                    </div>
                  </blockquote>
                  <div class=""><br class="">
                  </div>
                  <div class="">The code I sent before will poll a bit
                    too quickly :) I forgot to add a wait on the client:</div>
                  <br class="">
                  <div class="">
                    <div class="" style="font-family: Helvetica;
                      font-size: 12px; font-style: normal; font-variant:
                      normal; font-weight: normal; letter-spacing:
                      normal; orphans: auto; text-align: start;
                      text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;">
                      <div class=""><br class="">
                      </div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>replaced<br
                          class="">
                        <span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>ifTrue:
                        [div with: [self renderNextOn: html]]<br
                          class="">
                        <span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>ifFalse:
                        [<br class="">
                        <span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>html
                        document addLoadScript: (self loadScriptOn:
                        html).<br class="">
                      </div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>div
                        with: [<br class="">
                        <span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>html
                        image src: someSpinnerImage<br class="">
                        <span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>html
                        space; text: self message]]</div>
                      <div class=""><br class="">
                      </div>
                      <span class="Apple-tab-span" style="white-space: pre;">        </span>loadScriptOn:
                      html</div>
                    <div class="" style="font-family: Helvetica;
                      font-size: 12px; font-style: normal; font-variant:
                      normal; font-weight: normal; letter-spacing:
                      normal; orphans: auto; text-align: start;
                      text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;"><br class="">
                    </div>
                    <div class="" style="font-family: Helvetica;
                      font-size: 12px; font-style: normal; font-variant:
                      normal; font-weight: normal; letter-spacing:
                      normal; orphans: auto; text-align: start;
                      text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;">
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">                </span>(html
                        jQuery: self idSelector) load html: [:r |</div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">                                        </span>self
                        isDataReady</div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">                                                </span>ifTrue:[ replaced
                        := true.<br class="">
                        <span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">                        </span> 
                          self renderNextOn: html]</div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">                                                </span>ifFalse:
                        [ r addLoadScript: ((self loadScriptOn: r)
                        timeout: 1000) ]).</div>
                    </div>
                  </div>
                </div>
                <div class=""><br class="">
                </div>
                <br class="">
                _______________________________________________<span
                  class="Apple-converted-space"> </span><br class="">
                seaside mailing list<span class="Apple-converted-space"> </span><br
                  class="">
                <a moz-do-not-send="true"
                  href="x-msg://11/user/SendEmail.jtp?type=node&amp;node=4862164&amp;i=1"
                  target="_top" rel="nofollow" link="external" class="">[hidden
                  email]</a><span class="Apple-converted-space"> </span><br
                  class="">
                <a moz-do-not-send="true"
href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside"
                  target="_top" rel="nofollow" link="external" class="">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br
                  class="">
                <br class="">
                <br class="">
                <hr class="" size="1" noshade="noshade">
                <div style="color: rgb(68, 68, 68); font-style: normal;
                  font-variant: normal; font-weight: normal; font-size:
                  12px; line-height: normal; font-family: tahoma,
                  geneva, helvetica, arial, sans-serif;" class="">
                  <div style="font-weight: bold;" class="">If you reply
                    to this email, your message will be added to the
                    discussion below:</div>
                  <a moz-do-not-send="true"
href="http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862164.html"
                    target="_top" rel="nofollow" link="external"
                    class="">http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862164.html</a></div>
                <div style="color: rgb(102, 102, 102); font-style:
                  normal; font-variant: normal; font-weight: normal;
                  font-size: 11px; font-family: tahoma, geneva,
                  helvetica, arial, sans-serif; margin-top: 0.4em;
                  line-height: 1.5em;" class="">To unsubscribe from
                  Non-blocking jQuery load,<span
                    class="Apple-converted-space"> </span><a
                    moz-do-not-send="true" href="" target="_top"
                    rel="nofollow" link="external" class="">click here</a>.<br
                    class="">
                  <a moz-do-not-send="true"
href="http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml"
                    rel="nofollow" target="_top" link="external"
                    style="font-style: normal; font-variant: normal;
                    font-weight: normal; font-size: 9px; line-height:
                    normal; font-family: serif;" class="">NAML</a></div>
              </blockquote>
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">
              <pre class="moz-signature" cols="72" style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          <a moz-do-not-send="true" href="x-msg://11/user/SendEmail.jtp?type=node&amp;node=4862167&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]</a>
Fliederweg 1                         <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.objektfabrik.de/" target="_top" rel="nofollow" link="external">http://www.objektfabrik.de</a>
D-71640 Ludwigsburg                  <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://joachimtuchel.wordpress.com/" target="_top" rel="nofollow" link="external">http://joachimtuchel.wordpress.com</a>
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

</pre>
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">
              <hr style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class=""
                align="left" width="300"><span style="font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant: normal; font-weight: normal;
                letter-spacing: normal; orphans: auto; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; widows: auto; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">View this message in
                context:<span class="Apple-converted-space"> </span></span><a
                moz-do-not-send="true"
href="http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862167.html"
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">Re:
                Non-blocking jQuery load</a><br style="font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant: normal; font-weight: normal;
                letter-spacing: normal; orphans: auto; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; widows: auto; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px; float: none;
                display: inline !important;" class="">Sent from the<span
                  class="Apple-converted-space"> </span></span><a
                moz-do-not-send="true"
                href="http://forum.world.st/Seaside-General-f86180.html"
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">Seaside
                General mailing list archive</a><span
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px; float: none;
                display: inline !important;" class=""><span
                  class="Apple-converted-space"> </span>at<span
                  class="Apple-converted-space"> </span></span><a
                moz-do-not-send="true" href="http://nabble.com/"
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">Nabble.com</a><span
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px; float: none;
                display: inline !important;" class="">.</span><br
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px; float: none;
                display: inline !important;" class="">_______________________________________________</span><br
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px; float: none;
                display: inline !important;" class="">seaside mailing
                list</span><br style="font-family: Helvetica; font-size:
                12px; font-style: normal; font-variant: normal;
                font-weight: normal; letter-spacing: normal; orphans:
                auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;"
                class="">
              <a moz-do-not-send="true"
                href="mailto:seaside@lists.squeakfoundation.org"
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">seaside@lists.squeakfoundation.org</a><br
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">
              <a moz-do-not-send="true"
href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside"
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px;" class="">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a></div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
seaside mailing list
<a class="moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>