This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Bear Bibeault wrote:That's usually a sign of an infinite loop or unending recursion. Inspect your code for such.
I was able to get as far as seeing that the loop goes away if I comment out the comments of the WhatImageFirst function, and starts up again as soon as I add the IF logic, and the img.src = "ilock30.png";
Every time you change the image source, the onload event fires.
Joined: Nov 08, 2001
ALso you should not be referencing elements directly by their id. You are using something that is not efficient and is not supported in every browser. Pass a string and use getElementById OR pass in the current scope of this when appropriate.