C
Christoph
newFieldElement = document.createElement( 'INPUT' );
newFieldElement.onblur = new Function( "calculatePremiumOptionTotal( this );" );
In my (dynamically generated) javascript, I've never had a problem with
attaching a function to an event using the above. However, what's going
on with the above is that the reference to the element object (this) isn't
being passed to my function. When I do an alert on the argument within
the function, I'm getting undefined.
Are you not allowed to pass 'this' reference when attaching a function to
an event as exampled above?
Any insight would be greatly appreciated!
thnx,
Christoph
newFieldElement.onblur = new Function( "calculatePremiumOptionTotal( this );" );
In my (dynamically generated) javascript, I've never had a problem with
attaching a function to an event using the above. However, what's going
on with the above is that the reference to the element object (this) isn't
being passed to my function. When I do an alert on the argument within
the function, I'm getting undefined.
Are you not allowed to pass 'this' reference when attaching a function to
an event as exampled above?
Any insight would be greatly appreciated!
thnx,
Christoph