just store the reference to the listener and re-attach it to the element after the user has successfully purchased more comment tokens or whatnot.
var myListener = function(){}; $("button").stopObserving(); //.. user buys tokens... $("button").observe('click', myListener); -- http://positionabsolute.net On Jul 21, 4:26 pm, Walter Lee Davis <wa...@wdstudio.com> wrote: > I have a video editing app that I'm working on where you can add > captions to your movie up to a total number of purchased captions. > When you reach that limit, I disable the buttons that add more > captions by using Element.stopObserving and changing the button image > to reflect this disabled nature. > > Now the client would like me to add "purchase more" to the same > screen, so I would like to know if I can memoize the listener from an > element, disable it, and then re-enable it from memory later in the > same session. I know that this page will work the way it is if I > reload the page after a successful purchase of new captions, but it's > a big page, and I'd like to avoid that if I can. > > Any ideas? > > Thanks, > > Walter -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.