Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- How do I change image.onload function content?


Fotiman - 9:31 pm on Jan 19, 2012 (gmt 0)


What you need is a closure.
For example:
[webmasterworld.com...]

Or

mypics[x].onload = (function (i) {
return function() {
imageheight[i] = mypics[i].height;
};
})(x);


Thread source:: http://www.webmasterworld.com/javascript/4408706.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com