Comment Comment by smysore why hasn't anyone suggested this: els[i].addEventListener('click', new Function("","alert("+i+");"),false);it works fine and it's much shorter and easier to read than nested function declarations parent smysore 16 years ago
it works fine and it's much shorter and easier to read than nested function declarations