[Seaside] Scriptaculous OO API

Boris Popov boris at deepcovelabs.com
Wed Nov 22 19:25:57 UTC 2006

Cool thanks!


(Sent from a BlackBerry)

----- Original Message -----
From: seaside-bounces at lists.squeakfoundation.org <seaside-bounces at lists.squeakfoundation.org>
To: The Squeak Enterprise Aubergines Server - general discussion. <seaside at lists.squeakfoundation.org>
Sent: Wed Nov 22 11:22:52 2006
Subject: Re: [Seaside] Scriptaculous OO API

> 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
Seaside mailing list
Seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20061122/553c48cc/attachment.htm

More information about the Seaside mailing list