[Seaside] style CSS and liveCallback

Avi Bryant avi.bryant at gmail.com
Tue Apr 11 06:21:30 UTC 2006

On Apr 10, 2006, at 10:48 PM, Michel Bany wrote:

>>       I have a liveCallback on a select tag. When any element  is  
>> selected on this tag, I want change Style. I noticed when I  
>> perform a submission of the form, the #style method is called, so  
>> CSS is applied, but when I used liveCallbak, that doesn't happen.
>> How could I update the CSS code when I'm using liveCallback?
>> I am working with  Seaside2.5b8-mb.15/Squeak3.7.
> The #style methods are not called during execution of  live callbacks.
> Even if they were, their corresponding values would not be used,
> since the live callback Javascript does not handle the html head
> elements. Processing them, i.e. download the stylesheets and apply
> the styles would be quite a challenge.

Never update CSS styles dynamically.  A #style method should always  
just return a literal string.  Instead, add different CSS classes for  
each of the possible styles you'll want, have permanent CSS entries  
that define styles for these classes, and change the class of your  
element dynamically when you want it to change its look.


More information about the Seaside mailing list