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 6753585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:10:44+00:00 2026-05-26T13:10:44+00:00

I’ve built a pie chart that is an image with client side image map.

  • 0

I’ve built a pie chart that is an image with client side image map. The image map is intially defined in the page but the coordinates get updated via JavaScript DOM manipulation to do something useful. Why is the DOM manipulation on image map coordinates effective only with some browsers while others just appear to ignore the changes? Is there a simple reason and fix? The pie chart can be seen here on the bottom right: http://catza.net/en/browseall/

I’ve tested this on Windows 7 and it works on Chrome 15.0 (WebKit), Firefox 7.0 (Gecko) and Safari 5.1 (WebKit). Those browser show correct drill down links on the sectors to the search engine and also titles when mouse pointer is over the pie. Internet Explorer 8 (Trident) and Opera 11.52 (Presto) just seem to stick with the initial coordinates. Based on this limited testing DOM update on image map coordinates works with Gecko and Webkit and but not with Trident and Presto. More test results are welcome.

Here is some background information about the implementation. The page source of http://catza.net/en/browseall/ shows the image tag <img id="viz_dist” and the map tag <map name="map_dist">. There is everything else ready in the map but not the correct coordinates since they are not yet known. The chart and the correct map coordinates are provided by Google Image Charts API. The update code http://catza.net/js_site/dist.js activates on $(document).ready and then processes the JSON data received to DOM. It touches the coords attribute using JQuery attr. The reset of the source code can be found on Google Code: http://code.google.com/p/catz/

I know that there are plenty of workarounds available. I could load the coordinates to the server and set them correctly when the page is created. But that means the page cannot be sent out before I receive the coordinates from Google. I could use the newer Google Chart Tools but my tests indicate I get faster page rendering especially on slow workstations with Google Image Charts API. I could also create both the img and map tags dynamically to DOM using JavaScript but I rather build the complete page on the server.

  • 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-26T13:10:44+00:00Added an answer on May 26, 2026 at 1:10 pm

    I have found a solution. The issue wasn’t at all about DOM update of image map coordinates working only with some browsers.

    I was breaking the same origin policy in trying to fetch JSON from Google, not from the original server. Then I noticed that JQuery’s $.getJSON gave a constant parseerror on IE. After making JSON data to go through the original server, sent it as text, received it with $.ajax and parsed it with $.parseJSON the image map coordinates update started to work with all browsers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I need a function that will clean a strings' special characters. I do NOT
I want to construct a data frame in an Rcpp function, but when I
Seemingly simple, but I cannot find anything relevant on the web. What is the

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.