so, the 'this' in 'this.changeState()' on the second to last line of the constructor code refers to the object _referObject, instead of the quickEntryObject---I need to fix this.
Do you think I have a paradigm error, or is there some way to get the desired effect?
p.s. when I use:
this._referObject.onclick = this.changeState;
I no longer have access to the actual object attributes.
CODE:
Expand|Select|Wrap|Line Numbers
- function quickEntryObject(webReferringLabel, webActionableObjects, state)
- {
- this._referObject = document.getElementById(webReferringLabel);
- this._actionObjects = new Array();
- this._state = state;
- for( indx = 0 ; indx < webActionableObjects.length ; indx++)
- {
- if (document.getElementById(webActionableObjects[indx]) != null)
- {
- this._actionObjects[this._actionObjects.length] = document.getElementById(webActionableObjects[indx]).id;
- }
- }
- this._referObject.onclick = function() {this.changeState();};
- }