Hi
I'd like to know how it's possible to display an animated gif when the server is busy ? (like in seasidehosting when uploading files ;) ) I tried with a combination of onLoad: and onClick but didn't succeed. Thanks Cédrick _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Get inspiration from the spinner
http://shorecomponents.seasidehosting.st/seaside/ShoreDemo4 -- Pavel On 8/30/06, Cédrick Béler <[hidden email]> wrote: > Hi > > I'd like to know how it's possible to display an animated gif when the > server is busy ? > (like in seasidehosting when uploading files ;) ) > I tried with a combination of onLoad: and onClick but didn't succeed. > > Thanks > > Cédrick > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> > (like in seasidehosting when uploading files ;) )
> > I tried with a combination of onLoad: and onClick but didn't succeed. The code on seasidehosting.st looks like this: renderButtonsOn: html html div class: 'buttons'; with: [ html submitButton disabled: self isQuotaExeeded; onClick: (html element id: 'spinner'; show); onClick: 'return true'; on: #upload of: self. html submitButton on: #close of: self. html image id: 'spinner'; style: 'margin-left: 5px; display: none;'; extent: 16 @ 16; url: '/resources/pics/spinner.gif' ]. Since this does a full page refresh it is automatically disabled after the refresh of the page. If you combine it with an AJAX action simply add a hide effect to the onComplete: event. Hope this helps, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> > The code on seasidehosting.st looks like this: > > renderButtonsOn: html > html div > class: 'buttons'; > with: [ > html submitButton > disabled: self isQuotaExeeded; > onClick: (html element > id: 'spinner'; > show); > onClick: 'return true'; > on: #upload of: self. > html submitButton > on: #close of: self. > html image > id: 'spinner'; > style: 'margin-left: 5px; display: none;'; > extent: 16 @ 16; > url: '/resources/pics/spinner.gif' ]. > > Since this does a full page refresh it is automatically disabled after > the refresh of the page. If you combine it with an AJAX action simply > add a hide effect to the onComplete: event. > > Hope this helps, > I just don't understand onClick: 'return true'; is it: return: true instead ... ? and anyway, can you explain a bit what this message does ? thanks Cédrick _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Pavel Krivanek-2
Pavel Krivanek a écrit : > Get inspiration from the spinner > http://shorecomponents.seasidehosting.st/seaside/ShoreDemo4 nice ;) but I don't have shoreComponent right now in my image to see the code... I'll have a look soon ... Thanks _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by cbeler
> > renderButtonsOn: html
> > html div > > class: 'buttons'; > > with: [ > > html submitButton > > disabled: self isQuotaExeeded; > > onClick: (html element > > id: 'spinner'; > > show); > > onClick: 'return true'; > > on: #upload of: self. Yes, this is done with an older version of Scriptaculous, you should better use: html submitButton disabled: self isQuotaExeeded; onClick: (html element id: 'spinner'; show; return: true); on: #upload of: self. The "return: true" makes sure that the web-browser commits the form, else it just executes the JavaScript and the submit does not happen. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |