.onfocus = someFunction; problem...?
Posted on 2005-04-06
What is different about the following?
document.getElementById('myframeid').onfocus = someFunction;
document.getElementById('myframeid').onfocus = someFunction(100, 200);
I think this question might provide the answer I’m looking for. However, if it does not I can provide more code as to where my specific problem is. More or less all I need to point out at this point is that the first line of code works as it should. That is, every time that ‘myframeid’ gets the focus, someFunction() runs properly.
However, in the 2nd line where I pass a parameter, every time ‘myframeid’ gets the focus the function does not run properly. And yes, I am altering someFunction() to include the passed in parameter like someFunction(passedNumber). My guess is that this is something to do with not being able to pass parameters in the .onfocus handler?