P
Phil
Consider the following code:
var pageEl=document. getElementById('someElement');
var foo='This is the right value of foo to use';
pageEl.addEventListener('click',function(evtObj){someClick(evtObj,foo);});
foo='This is the WRONG value of foo to use';
How do I get someClick to always use "the right value of foo"?
var pageEl=document. getElementById('someElement');
var foo='This is the right value of foo to use';
pageEl.addEventListener('click',function(evtObj){someClick(evtObj,foo);});
foo='This is the WRONG value of foo to use';
How do I get someClick to always use "the right value of foo"?