AJAX with DOM
I can get the coordinates of my click event with the code below but, I get them one click late. After the page loads, the first click returns id=. The browser address bar appears to be current i.e. it shows the proper coordinates as a hash. The next click returns id=123,456 where the numbers are the coordinates of the first click. So, the id is always one click out of phase with the user. An inattentive user will no doubt double post icons unless I can get the click event in phase.
As you can see below, I am using document.location.hash to get the coordinates. Other coordinate methods like clientX, offsetX etc are relative to the window, not the image or dont work in all browsers.
<a href="#" onclick="new Ajax.Updater('drill_map', '/map_page/add_hole?id=' + window.location.hash.substring(2), {asynchronous:true, evalScripts:true}); return false;"><img ISMAP="true" alt="Blank" height="880" id="map" src="/images/blank.png" style="border: none;" width="800" /></a>

