[Seaside] Jquery select then hide

Hilaire hilaire at drgeo.eu
Sun Apr 26 21:47:16 UTC 2015


Hi,

A classic problem I can't get through: Depending on a select answer I
want to hide or show a node in the DOM tree.

So far I try this with mixed result:


            (field := mold at: #civility) "a select tag"
                    onChange: [ :aHtml | aHtml jQuery ajax serialize:
aHtml jQuery this];
                    customize: [:selectTag | "just set the seside
callback to the select tag"
                        selectTag callback: [: val |
                            field input: val.
                            html jQuery ajax script: [ :s |
                                val == #miss
                                    ifTrue: [s << (s jQuery: #maiden) show]
                                    ifFalse: [s << (s jQuery: #maiden)
hide]]
                            ]
                        ].
   

The serialize part work (it took me some time to realize
jQuery>>serialize does not much, but JAjax>serialize runs the form callback)
The script part does not work. What I am mssing?


A question about load: is it about updating a node with refreshed html
rendering from the server?


Thanks

-- 
Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu




More information about the seaside mailing list