[Seaside] AJAX - form

Jakub seasidebeginner at gmail.com
Mon Jan 7 22:13:29 UTC 2008


goal is simple login component working with ajax. After click on login
button is component validate username and pass and render self.

i take login logic from seaside tutorial something like this:

        form: [html textInput on: #email of: self;
                 value: ''.
            html break.
            html passwordInput
                callback: [:value | self password: value];
                 value: ''.
            html submitButton
                callback: [self validateLogin];
                 text: 'Login']

but submitButton after click call http request and i donw know how change
this button's ability. I remove submit button and add simple anchor
something like this:

html anchor onClick: (html updater id: 'login'; callback: [:r | self
validateLogin. self renderContentOn: r| ]); with: 'login'.

but i have not set self email and pass because i think seaside set my
variables after form submit. My question is simple how get value of
textInput and passwordInput when i want use anchor and ajax. And second
isn't there better way than anchor?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080107/6ee05283/attachment.htm

More information about the seaside mailing list