| Author |
Setting on click function and passing in variable
|
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
I am doing something like this: The problem is that for every element that gets this on click function id is always the last id of the loop. So no matter what element I click I get an ID of say 1008. How do I get it to use a different id for each function? Thanks.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
http://www.coderanch.com/t/119917/HTML-JavaScript/Scope-Chain-Closures Eric
|
 |
 |
|
|
subject: Setting on click function and passing in variable
|
|
|