[Seaside] Scriptaculous OO API

Lukas Renggli renggli at gmail.com
Wed Nov 22 19:22:52 UTC 2006

> html script: ((html javascript)
>  add: (SUStream on: '$(''mydiv'').style.width="50%"');
>  yourself)

Scriptaculous does not define a protocol to edit style but one to
add/remove/enumerate classes. So I suggest that you define in your

        .half { width: 50% }

and then you do in Seaside:

        html script: (html element id: 'mydif'; addClassNamed: 'half')

And this is it.

However if you really want to mess around with styles you can do that
of course. Grab the latest version of Scriptaculous, I've added tree
new methods: #styleAt:, #styleAt:put: and #style:.

        html script: (html element id: 'mydif'; styleAt: 'width' put: '50%')

Hope this helps,

Lukas Renggli

More information about the Seaside mailing list