If you want to use the onchange functions, you can do something like this:
this.el = document.getElementById(this.docID);
if(x==y) {
this.el.onchange = function(){
}
if(a==b) {
var oldOnChange = this.el.onchange;
this.el.onchange = function(){
if(oldOnChange) oldOnChange();
}
}
Similarly, you can also decide whether you want the old exchange function to be executed before or after the new exchange code.
source
share