[Seaside] Re: Help with JQuery example

Bob Arning arning315 at comcast.net
Thu Aug 23 22:53:12 UTC 2012


Well, now that you have the triggerSubmit in there, this seems to work:

renderContentOnSqueakman3: html

(html form)
     id: #form;
     with:
         [html label with: 'Name'.
         (html textInput)
             id: #temp;
             value: 'sample text'.

         (html button beSubmit)        "<=====change"
             onClick: (html jQuery ajax
                 callback: [:v | self halt]
                 value: (html jQuery: #temp) value);

             onClick: (html jQuery ajax script:
                 [:s | (s jQuery: #form) triggerSubmit]);

             callback: [self halt];    " non-ajax callback"
             with: 'Pay >']


On 8/23/12 6:08 PM, squeakman wrote:
> Hello Again,
>
> The callback for the onClick works but now I am stuck on getting the 
> callback for the button to be called - the one with the comment 
> "non-ajax callback" in the code below.
>
> I read on the web that: "Instead put your callback code into the 
> jQuery callback itself, aka the #script: block."  This is what I am 
> trying to do below but it failed along with a few other experiments I 
> tried.
>
> What I want to do is trigger the form so that all the various 
> callbacks are called.
>
> Can you offer any help with this?
>
> Thanks again,
> Frank
>
> ----- code follows ----
>
> renderContentOn: html
>
> (html form)
>     id: #form;
>     with:
>         [html label with: 'Name'.
>         (html textInput)
>             id: #temp;
>             value: 'sample text'.
>
>         (html button bePush)
>             onClick: (html jQuery ajax
>                 callback: [:v | self halt]
>                 value: (html jQuery: #temp) value);
>
>             onClick: (html jQuery ajax script:
>                 [:s | (s jQuery: #form) triggerSubmit]);
>
>             callback: [self halt];    " non-ajax callback"
>             with: 'Pay >']
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120823/5704e6ff/attachment.htm


More information about the seaside mailing list