[Seaside] JQuery load question
Sven Van Caekenberghe
sven at stfx.eu
Mon May 19 13:13:43 UTC 2014
I was hoping you would answer ;-)
Yes, that works perfectly !
Thanks a lot.
PS: Since you really know so much about this subject, it would help us all tremendously if you wrote some documentation beyond what is in the Seaside book - there is so much missing...
On 19 May 2014, at 15:06, Johan Brichau <johan at inceptive.be> wrote:
> Hi Sven,
> In theory, you can still use load and render the entire input field again.
> But you are right that setting the value of the input field is a better approach because replacing the entire field often messes with the keyboard focus.
> What you need is a script callback:
> (html jQuery ajax script: [:s | myModel doSomething. s << ((s jQuery id: #foo) value: myModel displayString)]
> I hope this is what you were looking for.
> On 19 May 2014, at 14:59, Sven Van Caekenberghe <sven at stfx.eu> wrote:
>> I had some code that worked fine using JQuery's load functionality:
>> html div id: #foo
>> html button
>> onClick: ((html jQuery id: #foo) load html: [ :h |
>> myModel doSomething.
>> h render: myModel displayString ]);
>> with: 'Do Something'
>> Now, I switched #foo to a form input:
>> html textInput id: #foo
>> But then I should use #value: and not replace the HTML so I can't use load anymore.
>> I don't seem to be able to write this but I am a real beginner here. Anyone ?
>> PS: the data coming back is just a string, not HTML.
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside