Thanks for your reply, Im very new at this and was hoping more for
some code to as a starting point?


On May 8, 3:39 am, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> Hi,
>
> Prototype can definitely help you with that.  Off the top of my head,
> the Prototype methods you want are Element#observe[1] (which is a
> convenience wrapper for Event.observe[2]) and probably
> Element#addClassName[3] and Element#removeClassName[4].  [OT (e.g.,
> not Prototype-related) you might want to use === and !== in your
> comparisons of object instances, rather than == and != (see the
> ECMAScript spec[5] for more on identity comparisons).]
>
> If you're just getting started with Prototype, it's _well_ worth your
> time having a read through the API[6] from beginning to end.  It takes
> about an hour, and saves you hours and hours in return.  The learn[7]
> page and the unofficial wiki[8] may also be useful.
>
> [1]http://prototypejs.org/api/element/observe
> [2]http://prototypejs.org/api/event/observe
> [3]http://prototypejs.org/api/element/addClassName
> [4]http://prototypejs.org/api/element/removeClassName
> [5]http://www.ecma-international.org/publications/standards/Ecma-262.htm
> [6]http://prototypejs.org/api
> [7]http://prototypejs.org/learn
> [8]http://proto-scripty.wikidot.com
>
> HTH!
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available
>
> On May 8, 5:53 am, "z...@zanepaul.com.au" <z...@zanepaul.com.au>
> wrote:
>
>
>
> > Im trying to get this code working in FireFox and Sarfari
>
> > var changeStyleColour = function () {
> >         var active = null, newclass = "colourActive";
> >         if (this.Event.addEventListener) this.Event.addEventListener
> > ('onUnload', function ()
> >                  {active = null;});
> >         return function (element) {
> >             if ((active != element) && element.className) {
> >                 if (active) active.className = "colourNormal";
> >                 element.className = newclass;
> >                 active = element;
> >             }
> >         };
> >     }();
>
> > Can someone please help- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to