[Seaside] change element property client side

Lukas Renggli renggli at gmail.com
Wed Jul 4 05:50:09 UTC 2007


> I'm a little bit confused, i guess what you're doing in this example is to
> change the css class of an element and thus, changing its style.
> But what i need to do is to change an element's inherent property such as
> src of img, or href in an anchor, i.e. a non-css property..
> My knowledge about html and css is limited, perhaps the kind of properties
> i'm trying to change can be changed with css...??

Yes, the image can be set and changed using a CSS class and the
background-image property.

In the latest version of Scriptaculous you can write:

   html anchor
       onClick: (html element
           id: 'otherAnchor';
           access: 'href';
           assign: 'http://www.seaside.st')

>From the commit log:

   Name: Scriptaculous-lr.204
   Author: lr
   Time: 4 July 2007, 7:49:17 am
   UUID: b57f0d1e-9ccd-4e02-840b-5a1a6f4423c8
   Ancestors: Scriptaculous-lr.203

   - added #assign: and tests

Hope this helps,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the Seaside mailing list