Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 998637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:13:42+00:00 2026-05-16T07:13:42+00:00

I have the following image tag in a JSP: <img id=validationGraph src=/myapp/MyServlet?mode=myMode usemap=#validationMap border=0

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:13:43+00:00Added an answer on May 16, 2026 at 7:13 am

    The Object Expected error is usually displayed when you try to call a method or access a property on an object and that object is null.

    You have an error in your JavaScript that happens once in a while. I suspect that it is code that depends on the getImageMap function to run. If I remember correctly, the onLoad event on images is tricky on IE because it only fires if the images is loaded from the server.

    It might be possible that once in a while IE takes the image from its cache instead of going to the server (and no longer fires the event)? Add a timestamp to each servlet call and see if it removes the problem:

    src="/myapp/MyServlet?mode=myMode&tstmp=unique_value_for_each_call_to_invalidate_browser_cache" 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.