I have the following image tag in a JSP:
<img id="validationGraph" src="/myapp/MyServlet?mode=myMode"
usemap="#validationMap" border="0" onLoad="getImageMap()" />
A Java servlet uses JFreeChart to generate a png image and write it to the output stream. This works fine in Firefox and Chrome, but I am getting an intermittent error in IE. In all 3 browsers, the image does actually load every time. But most of the time in IE, I get an "Object expected" error on the img tag line and the getImageMap() function fails to fire. Sometimes the page loads fine in IE with no error message and with the getImageMap function firing.
I thought perhaps an Ajax call in getImageMap() was causing the intermittent problem, so I put some alerts in that function. One of the alerts is the very first line of the function. When IE works correctly, the various alerts pop up as expected. When IE reports that error message, NONE of the alerts popup. So it looks like IE isn't even entering the getImageMap() function when this particular error occurs.
I have tried various troubleshooting/debugging, and I can't find the root cause of this problem. Any suggestions?