Re: Non-blocking jQuery load
| Newsgroups | gmane.comp.lang.smalltalk.squeak.seaside |
|---|---|
| Message-ID | <[email protected]> |
Hi Johan, Adding a loadScript during an ajax callback is a really cool trick. I've got this working - in principle ;-) There is, however, a problem: jQuery's load doesn't support timeouts (nor any other paramters) . So I need to rewrite load as an ajax call which supports the timout parameter. Currently struggling a bit, but it's a good learning experience ;-) Again, thanks a lot, you've added a few important building blocks to the solution! Joachim Am 20.11.15 um 10:06 schrieb Johan Brichau: > >> On 20 Nov 2015, at 09:57, Johan Brichau <[email protected] >> <mailto:[email protected]>> wrote: >> >> This perfectly fits your decoration implementation. Something along >> these lines (disclaimer: untested code written in email client :) : > > The code I sent before will poll a bit too quickly :) I forgot to add > a wait on the client: > > > replaced > ifTrue: [div with: [self renderNextOn: html]] > ifFalse: [ > html document addLoadScript: (self loadScriptOn: html). > div with: [ > html image src: someSpinnerImage > html space; text: self message]] > > loadScriptOn: html > > (html jQuery: self idSelector) load html: [:r | > self isDataReady > ifTrue:[ replaced := true. > self renderNextOn: html] > ifFalse: [ r addLoadScript: ((self loadScriptOn: r) timeout: 1000) ]). > > > > _______________________________________________ > seaside mailing list > [email protected] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [email protected] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside