Hi,
Most probably, this question has already been answered, but i cant find it :S, so.. I want to change an element's property when a javascript event occurs, e.g. the src property of an img html element must be changed when the onclick event of that image is triggered, but i want to do it client side. I can use an updater or an evaluator and render the whole element from scratch, in its parent element, with the new property value. The same applies when i want to add/remove an elements property... What is the best way to achieve this? regards and thanks a lot Leandro |
> What is the best way to achieve this?
Using Scriptaculous. For example to toggle the CSS class 'zork' on an element named 'foo': html anchor onClick: (html element id: 'foo'; toggleClassName: 'zork'); with: 'add class' Have a look at the class SUElement/SUFormElement for other methods. Also check out the senders of #element and #formElement, there are many tests and a few examples. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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...?? |
> 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 _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Ok I'm afraid I don't know how to update my scriptaculous version to Scriptaculous-lr.204. I'm using Scriptaculous-lr.188, the version that comes with the package available at cincom public repository. I can't find the version you name in the public repository How can I load the latest version of scriptaculous?? I'm using: VisualWorks® NonCommercial, 7.5 Seaside 2.7b1.1.0,mbany SeasideScriptaculous 2.7b1.188.0,mbany It helps a lot! thanks Lukas |
Ah, you're just going to have to wait for Michel to update the VisualWorks version.
Speaking of which, anyone from Cincom listening? If you're going to put work into Seaside can we get someone to help Michel with bringing new and exciting stuff to VisualWorks on a regular basis please? ;) I'd love to try 2.8, for instance, but would much rather load it from Public Repository, feel free to mark it broken too. Cheers! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. > -----Original Message----- > From: [hidden email] [mailto:seaside- > [hidden email]] On Behalf Of Leandro Pérez > Sent: Wednesday, July 04, 2007 10:44 AM > To: [hidden email] > Subject: Re: [Seaside] change element property client side > > > > Lukas Renggli wrote: > > > >> 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. > > > Ok > > > Lukas Renggli wrote: > > > > 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 > > > I'm afraid I don't know how to update my scriptaculous version to > Scriptaculous-lr.204. > I'm using Scriptaculous-lr.188, the version that comes with the package > available at cincom public repository. I can't find the version you name > in > the public repository > > How can I load the latest version of scriptaculous?? > > > I'm using: > VisualWorks® NonCommercial, 7.5 > Seaside 2.7b1.1.0,mbany > SeasideScriptaculous 2.7b1.188.0,mbany > > > > Lukas Renggli wrote: > > > > Hope this helps, > > Lukas > > > It helps a lot! thanks Lukas > > > -- > View this message in context: http://www.nabble.com/change-element- > property-client-side-tf4020240.html#a11434952 > Sent from the Squeak - Seaside mailing list archive at Nabble.com. > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2007/7/4, Boris Popov <[hidden email]>:
> Ah, you're just going to have to wait for Michel to update the VisualWorks version. > > Speaking of which, anyone from Cincom listening? If you're going to put work into Seaside can we get someone to help Michel with bringing new and exciting stuff to VisualWorks on a regular basis please? ;) I'd love to see that too. More usage and feedback is always good. It also helps to find portability bugs during the cycle and not at the end of it. This way they propagate into the next. Some clear words from Cincom where Michel fits into their vision of Seaside surely would be welcome. Philippe > I'd love to try 2.8, for instance, but would much rather load it from Public Repository, feel free to mark it broken too. > > Cheers! > > -Boris > > -- > +1.604.689.0322 > DeepCove Labs Ltd. > 4th floor 595 Howe Street > Vancouver, Canada V6C 2T5 > http://tinyurl.com/r7uw4 > > [hidden email] > > CONFIDENTIALITY NOTICE > > This email is intended only for the persons named in the message > header. Unless otherwise indicated, it contains information that is > private and confidential. If you have received it in error, please > notify the sender and delete the entire message including any > attachments. > > Thank you. > > > -----Original Message----- > > From: [hidden email] [mailto:seaside- > > [hidden email]] On Behalf Of Leandro Pérez > > Sent: Wednesday, July 04, 2007 10:44 AM > > To: [hidden email] > > Subject: Re: [Seaside] change element property client side > > > > > > > > Lukas Renggli wrote: > > > > > >> 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. > > > > > Ok > > > > > > Lukas Renggli wrote: > > > > > > 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 > > > > > I'm afraid I don't know how to update my scriptaculous version to > > Scriptaculous-lr.204. > > I'm using Scriptaculous-lr.188, the version that comes with the package > > available at cincom public repository. I can't find the version you name > > in > > the public repository > > > > How can I load the latest version of scriptaculous?? > > > > > > I'm using: > > VisualWorks(r) NonCommercial, 7.5 > > Seaside 2.7b1.1.0,mbany > > SeasideScriptaculous 2.7b1.188.0,mbany > > > > > > > > Lukas Renggli wrote: > > > > > > Hope this helps, > > > Lukas > > > > > It helps a lot! thanks Lukas > > > > > > -- > > View this message in context: http://www.nabble.com/change-element- > > property-client-side-tf4020240.html#a11434952 > > Sent from the Squeak - Seaside mailing list archive at Nabble.com. > > > > _______________________________________________ > > Seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Especially considering that Michel had built a plethora of tools that make the port simply, from what I know. I almost think it could be automated for all but the most complicated changes...
-Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. > -----Original Message----- > From: [hidden email] [mailto:seaside- > [hidden email]] On Behalf Of Philippe Marschall > Sent: Wednesday, July 04, 2007 10:57 AM > To: Seaside - general discussion > Subject: Re: [Seaside] change element property client side > > 2007/7/4, Boris Popov <[hidden email]>: > > Ah, you're just going to have to wait for Michel to update the > VisualWorks version. > > > > Speaking of which, anyone from Cincom listening? If you're going to put > work into Seaside can we get someone to help Michel with bringing new and > exciting stuff to VisualWorks on a regular basis please? ;) > > I'd love to see that too. More usage and feedback is always good. It > also helps to find portability bugs during the cycle and not at the > end of it. This way they propagate into the next. > > Some clear words from Cincom where Michel fits into their vision of > Seaside surely would be welcome. > > Philippe > > > I'd love to try 2.8, for instance, but would much rather load it from > Public Repository, feel free to mark it broken too. > > > > Cheers! > > > > -Boris > > > > -- > > +1.604.689.0322 > > DeepCove Labs Ltd. > > 4th floor 595 Howe Street > > Vancouver, Canada V6C 2T5 > > http://tinyurl.com/r7uw4 > > > > [hidden email] > > > > CONFIDENTIALITY NOTICE > > > > This email is intended only for the persons named in the message > > header. Unless otherwise indicated, it contains information that is > > private and confidential. If you have received it in error, please > > notify the sender and delete the entire message including any > > attachments. > > > > Thank you. > > > > > -----Original Message----- > > > From: [hidden email] [mailto:seaside- > > > [hidden email]] On Behalf Of Leandro Pérez > > > Sent: Wednesday, July 04, 2007 10:44 AM > > > To: [hidden email] > > > Subject: Re: [Seaside] change element property client side > > > > > > > > > > > > Lukas Renggli wrote: > > > > > > > >> 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. > > > > > > > Ok > > > > > > > > > Lukas Renggli wrote: > > > > > > > > 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 > > > > > > > I'm afraid I don't know how to update my scriptaculous version to > > > Scriptaculous-lr.204. > > > I'm using Scriptaculous-lr.188, the version that comes with the > package > > > available at cincom public repository. I can't find the version you > name > > > in > > > the public repository > > > > > > How can I load the latest version of scriptaculous?? > > > > > > > > > I'm using: > > > VisualWorks(r) NonCommercial, 7.5 > > > Seaside 2.7b1.1.0,mbany > > > SeasideScriptaculous 2.7b1.188.0,mbany > > > > > > > > > > > > Lukas Renggli wrote: > > > > > > > > Hope this helps, > > > > Lukas > > > > > > > It helps a lot! thanks Lukas > > > > > > > > > -- > > > View this message in context: http://www.nabble.com/change-element- > > > property-client-side-tf4020240.html#a11434952 > > > Sent from the Squeak - Seaside mailing list archive at Nabble.com. > > > > > > _______________________________________________ > > > Seaside mailing list > > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > > Seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Uhhfs, what a pity! Anyway, do you know if I can do it myself? I just found this post about Porting Seaside and Scriptaculous to VisualWorks and its written by you, so maybe you can tell me if it is useful to do what it says there or if it's just a waste of time...meaning that it just won't work... http://www.nabble.com/Porting-Seaside-and-Scriptaculous-to-VisualWorks-tf1687741.html#a4579387 |
I'd tried it once, but never quite got it figured it as Michel was on vacation at a time. I'll ping James to see if they could help us out, I'm anxious to stay up-to-date as well and suspect we'll all benefit from it.
Cheers! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. > -----Original Message----- > From: [hidden email] [mailto:seaside- > [hidden email]] On Behalf Of Leandro Pérez > Sent: Wednesday, July 04, 2007 11:07 AM > To: [hidden email] > Subject: [Seaside] RE: change element property client side > > > > Boris Popov-2 wrote: > > > > Ah, you're just going to have to wait for Michel to update the > VisualWorks > > version. > > > > Speaking of which, anyone from Cincom listening? If you're going to put > > work into Seaside can we get someone to help Michel with bringing new > and > > exciting stuff to VisualWorks on a regular basis please? ;) > > > > I'd love to try 2.8, for instance, but would much rather load it from > > Public Repository, feel free to mark it broken too. > > > > Cheers! > > > > Uhhfs, what a pity! > Anyway, do you know if I can do it myself? I just found this post about > Porting Seaside and Scriptaculous to VisualWorks and its written by you, > so > maybe you can tell me if it is useful to do what it says there or if it's > just a waste of time...meaning that it just won't work... > > http://www.nabble.com/Porting-Seaside-and-Scriptaculous-to-VisualWorks- > tf1687741.html#a4579387 > > -- > View this message in context: http://www.nabble.com/change-element- > property-client-side-tf4020240.html#a11435250 > Sent from the Squeak - Seaside mailing list archive at Nabble.com. > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Ok, thanks Boris! please feel free to e-mail me if you have any news, I will appreciate it Regards Leandro |
In reply to this post by Philippe Marschall
Hi,
Michel is part of our team and will continue to do ports. We're going to iterate toward a semi-automated solution for as much as we can in the future to reduce the workload. The trick is when things break. Michel isn't a full time engineer, which is why you don't see constant porting from him. Right now the porting exercise is partly-semi-automated but I'd like to make it a cron job on a server somewhere :) Cheers, Michael > > Some clear words from Cincom where Michel fits into their vision of > Seaside surely would be welcome. > > Philippe > >> I'd love to try 2.8, for instance, but would much rather load it from >> Public Repository, feel free to mark it broken too. >> >> Cheers! >> >> -Boris >> >> -- >> +1.604.689.0322 >> DeepCove Labs Ltd. >> 4th floor 595 Howe Street >> Vancouver, Canada V6C 2T5 >> http://tinyurl.com/r7uw4 >> >> [hidden email] >> >> CONFIDENTIALITY NOTICE >> >> This email is intended only for the persons named in the message >> header. Unless otherwise indicated, it contains information that is >> private and confidential. If you have received it in error, please >> notify the sender and delete the entire message including any >> attachments. >> >> Thank you. >> >> > -----Original Message----- >> > From: [hidden email] [mailto:seaside- >> > [hidden email]] On Behalf Of Leandro Pérez >> > Sent: Wednesday, July 04, 2007 10:44 AM >> > To: [hidden email] >> > Subject: Re: [Seaside] change element property client side >> > >> > >> > >> > Lukas Renggli wrote: >> > > >> > >> 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. >> > > >> > Ok >> > >> > >> > Lukas Renggli wrote: >> > > >> > > 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 >> > > >> > I'm afraid I don't know how to update my scriptaculous version to >> > Scriptaculous-lr.204. >> > I'm using Scriptaculous-lr.188, the version that comes with the >> package >> > available at cincom public repository. I can't find the version you >> name >> > in >> > the public repository >> > >> > How can I load the latest version of scriptaculous?? >> > >> > >> > I'm using: >> > VisualWorks(r) NonCommercial, 7.5 >> > Seaside 2.7b1.1.0,mbany >> > SeasideScriptaculous 2.7b1.188.0,mbany >> > >> > >> > >> > Lukas Renggli wrote: >> > > >> > > Hope this helps, >> > > Lukas >> > > >> > It helps a lot! thanks Lukas >> > >> > >> > -- >> > View this message in context: http://www.nabble.com/change-element- >> > property-client-side-tf4020240.html#a11434952 >> > Sent from the Squeak - Seaside mailing list archive at Nabble.com. >> > >> > _______________________________________________ >> > Seaside mailing list >> > [hidden email] >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> _______________________________________________ >> Seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > ------------------------------------------------------------------------ > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |