[Seaside] trying to use WASelectTag and its not working....
Bart Veenstra
bart.veenstra at gmail.com
Fri Sep 10 19:05:07 UTC 2010
Serializing the select box on the change event is very simple when you use
JQuery:
html select
list: (self class selectors);
selected: self codeSelector ;
onChange: (html jQuery ajax serializeThisWithHidden);
callback: [:value | self codeSelector: value ].
Regards.
Bart
2010/9/10 Lawson English <lenglish5 at cox.net>
> beSubmitOnChange; doesn't work, but html submitButton with: 'lookup'.
> does, thanks.
>
>
> Its working, but it would be more elegant if it used beSubmitOnChange.
>
>
> Still missing some syntax thing apparently.
> ==================
> html form:[
> html text: 'source code: '.
>
> html select
> list: (self class selectors);
> selected: self codeSelector ;
> beSubmitOnChange;
> callback: [:value | self codeSelector: value ].
> "html submitButton with: 'lookup'."
> html break.
> html textArea
> value: (self class sourceCodeAt: self codeSelector);
> rows: 30;
> columns: 60.
> ]
> ==================
>
>
>
> On 9/10/10 4:57 AM, Nick Ager wrote:
>
> Hi Lawson,
>
>
>> Do you expect it to be called on change or on form submit? If the
>> former, you need #beSubmitOnChange (or use proper JS library to wire
>> this event), if the latter, please post a complete example of a form.
>>
>>
>> html select
>> list: (self class selectors);
>> selected: #renderContentOn: ;
>> callback: [:value | self createText: value ].
>> html break.
>>
>
> As Boris says, your callback will only be evalulated when the form is
> submitted. So you need to add a form and a submit button or a call to
> #beSubmitOnChange. Something like:
>
> html form:[
> html select
> list: (self class selectors);
> selected: #renderContentOn: ;
> beSubmitOnChange;
> callback: [:value | self halt ].
> ].
>
> or instead of #beSubmitOnChange use:
>
> html submitButton with: 'lookup'.
>
> inside the form
>
> Nick
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.orghttp://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> 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/20100910/2a6c3664/attachment.htm
More information about the seaside
mailing list