A quick question about event management. I have a button that toggles
a style field on certain elements between two different values and
here's the code that I use:

function firstFunction(event) {
  $$("input[value='height toggle']")[0].stopObserving('click');
  function secondFunction(event) {
    $$("input[value='height toggle']")[0].stopObserving('click');
    $$("input[value='height toggle']")
  $$("input[value='height toggle']")

Basically what I do is toggle between two function on the same button
by having one set up the observer for the other by first clearing all
the other observers, a lot like a mutually recursive set of functions
and I'm wondering if there is a better way of doing this because I
know javascript is prone to memory leaks and I'm trying to avoid them.

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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to