Integration of scripaculous form element

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Integration of scripaculous form element

dtrussardi@tiscali.it
Hello All,

i work with VW7.4.1 and seaside support.
 
I'm interested to port one scripaculous form element ( for example one Check-Box ) in an form with standard submitButton.
 
In my test this integration is incompatible.
 
When define a form with submitButton the check-box callback d'ont work .
 
When i not define  form, the check-box callback work fine but other element  is not update.
 
Thank for any consideration,

Dario Trussardi Romano
 
 
 
 

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Integration of scripaculous form element

Lukas Renggli
> I'm interested to port one scripaculous form element ( for example
> one Check-Box ) in an form with standard submitButton.

The comment of #triggerFormElement: basically says it all:

SUAjax>>triggerFormElement: aString
        "Serializing form elements does not always work as one would expect,
since Seaside sometimes depends on extra hidden-fields to be triggered
to be able to perform your callback-block. When encountering a problem
(check-boxes, multi-select lists) try using #triggerForm: instead."

        self addParameter: (SUFormElement new
                id: aString;
                serialize)

In other words, submitting a single check-box or a single multi-select
list does not work, since for those elements Seaside generates some
additional hidden form elements that do not get submitted. Of course
it can be made working, but then you somehow need to submit those
hidden fields as well. Believe me, it is the easiest if you just put a
<form> around check-boxes and multi-select lists ;-)

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside