Hi -
This works as expected: renderContentOn: html self renderLightboxOn: html renderLightboxOn: html | id | html div id: (id := html nextId); script: (html jQuery new dialog title: 'Welcome Back!'; html: [ html text: 'Hi' ]; resizable: false; modal: true). ^ html submitButton onClick: (html jQuery id: id) dialog open; with: 'Hi' why does this only flash the lightbox without showing the contents: renderContentOnL html _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Oops.. fat fingers.
renderContentOn: html html form: [self renderLightboxOn: html]. I don't understand why wrapping the renderLightboxOn: method in a form causes the lightbox to briefly display on the screen. It seems to happen when other form elements are in the form as well like textInput or checkboxes etc. This is Seaside - 2.9a4 Thanks in advance Paul On Wed, Jul 22, 2009 at 12:26 PM, Paul DeBruicker<[hidden email]> wrote: > Hi - > > This works as expected: > > renderContentOn: html > self renderLightboxOn: html > > renderLightboxOn: html > | id | > html div > id: (id := html nextId); > script: (html jQuery new dialog > title: 'Welcome Back!'; > html: [ html text: 'Hi' ]; > resizable: false; > modal: true). > ^ html submitButton > onClick: (html jQuery id: id) dialog open; > with: 'Hi' > > > why does this only flash the lightbox without showing the contents: > > renderContentOnL html > seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
When you put the button in a form, then clicking it actually results
in the page being submitted. So your dialog is displayed but then a new page is immediately loaded (you should see the URL change). In order to abort the normal effect of the submit button, you need your onclick to return false. You could do: html submitButton onClick: ((html jQuery id: id) dialog open; return: false); with: 'Hi' (note that returning the result of this expression from your render method as you are doing is a bit weird) Or, probably better, don't use a submit button at all: html button bePush; onClick: (html jQuery id: id) dialog open; with: 'Hi' Julian On Wed, Jul 22, 2009 at 9:30 AM, Paul DeBruicker<[hidden email]> wrote: > Oops.. fat fingers. > > renderContentOn: html > html form: [self renderLightboxOn: html]. > > I don't understand why wrapping the renderLightboxOn: method in a form > causes the lightbox to briefly display on the screen. It seems to > happen when other form elements are in the form as well like textInput > or checkboxes etc. > > This is Seaside - 2.9a4 > > Thanks in advance > Paul > > > > > On Wed, Jul 22, 2009 at 12:26 PM, Paul DeBruicker<[hidden email]> wrote: >> Hi - >> >> This works as expected: >> >> renderContentOn: html >> self renderLightboxOn: html >> >> renderLightboxOn: html >> | id | >> html div >> id: (id := html nextId); >> script: (html jQuery new dialog >> title: 'Welcome Back!'; >> html: [ html text: 'Hi' ]; >> resizable: false; >> modal: true). >> ^ html submitButton >> onClick: (html jQuery id: id) dialog open; >> with: 'Hi' >> >> >> why does this only flash the lightbox without showing the contents: >> >> renderContentOnL html >> > _______________________________________________ > 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 |
Free forum by Nabble | Edit this page |