I have the following function that works in Chrome/IE:
for(var i = 0; i < 5; ++i) {
document.all["elems" + i].onscroll = getFunc("onScrollAdj(document.all['tb" + i + "']);");
}
function getFunc(jsString) {
return new Function(jsString);
}
However I get the error:
ReferenceError: event is undefined.
I have tried to re-write the function to include an event however I then get another error:
var i is undefined.
document.all["elems" + i].onscroll = onScrollAdj(event, document.all['tb" + i + "');
Is there any way to ensure both event and attributes can be passed?
onScrollAdj- I bet that has a reference toevent- which used to be an internet explorer "kludge" that for some reason Chrome decided to implement