[Seaside] How would you re-write this code to hide/show content

John Pierce john.raymond.pierce at gmail.com
Fri Jan 21 23:24:13 CET 2005

Hi Mike,

> I am new to seaside (and smalltalk even).  I wrote a small piece
> of code (pasted below) to show the content one of three DIVs,
> based on a selection from drop down box.  The code makes much use
> of javascript, and little use of the seaside API.  Can anyone
> offer any advice on how to write this the "seaside way"?

Yep -- the seaside way is to do what you are doing through a post-back
and return new content appropriate to the selected value.  The only
trick I think is that changing a drop down does not normally generate
a submit() of the form.  So you have to do the following when
rendering the selectbox in your renderContentOn: implementation:

html attributes submitOnChange.
"now render your html selectFromList"

If you need more hints let me know -- sorry for being brief.



Only the mediocre are always at their best. -- Jean Giraudoux

More information about the Seaside mailing list