I have some code for a lightbox below:

LightBox.prototype.showBox = function(){

        ...

        //Assign event handlers
        this.okBtn = this.lbElm.select('INPUT.control.ok')[0];
        if(this.okBtn)
        {
                this.okBtn.observe('click', this.okClick.bind(this));
                this.okBtn.focus();
        }

        ...

};

LightBox.prototype.okClick = function(){
        this.closeBox();
};


LightBox.prototype.closeBox = function(){
        alert('hi');
        var elms = this.lbElm.select('INPUT.control');
        elms.invoke('stopObserving');
        this.lbElm.remove();
        this.backDrop.remove();
};




The issue is that the stopObserving doesn't seem to work.  The OK
button will still pop-up the alert('hi') no matter how many times I
click it.  I tried doing something like this.okBtn.stopObserving() but
that didn't work either.  Any ideas?

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to