![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
We want to generate this: component.onblur = function() { callFun( this, 16 ) }; Any ideas? |

#3
| |||
| |||
|
|
We have a loop that calculates argValue = someIntegerValue; component.onblur = function() { callFun( this, argValue ) }; loop The problem is that the onblur call is exactly "callFun( this, argValue )" for every component so that the last value of argValue gets passed to every component. What we want is this. Assume, for one iteration, argValue had a value of 16. We want to generate this: component.onblur = function() { callFun( this, 16 ) }; Any ideas? |
#4
| |||
| |||
|
|
botski... (AT) gmail (DOT) com wrote: We want to generate this: component.onblur = function() { callFun( this, 16 ) }; Any ideas? I have one but it involves eval so I'll wait to see if anyone gives the proper solution ![]() |
#5
| |||
| |||
|
|
On Dec 14, 4:18 am, botski... (AT) gmail (DOT) com wrote: We have a loop that calculates argValue = someIntegerValue; component.onblur = function() { callFun( this, argValue ) }; loop The problem is that the onblur call is exactly "callFun( this, argValue )" for every component so that the last value of argValue gets passed to every component. What we want is this. Assume, for one iteration, argValue had a value of 16. We want to generate this: component.onblur = function() { callFun( this, 16 ) }; Any ideas? I think this thread will answer your question: "Adding events in a loop with arguments" URL:http://groups.google.com.au/group/co...browse_frm/thr... -- Rob |
![]() |
| Thread Tools | |
| Display Modes | |
| |