[sorry if this is a duplicate - it looks like I sent the first one to 
the old list address]

My application uses client side imagemaps to allow the user to interact 
with a server-drawn dynamic image. So to do that, each time the image is 
changed, it needs to download a new imagemap with new areas (things have 
moved within the image).

Here's my code to do that:
     $.get('editor-backend.php',{ map: mapfile, cmd: "imagemap" },
                     function(cont) {
                      $('map#weathermap_imap').empty()
                     $('map#weathermap_imap').append(cont);
                       console.log('I did try');
                       console.log(cont);
                     });


The console log shows that a valid chunk of <area> tags was fetched, but 
using firebug's HTML inspector, all that *actually* appears between the 
<map> tags is ', ' - a comma, and a space. If I try and append a small 
piece of text it's OK (but useless). If I try and append a single <area> 
'by hand', that fails too, as does using the alternative 
.append($('area')).

Here's a small piece of the imagemap:

<area alt="NODE:node00364"  id="NODE:node00364"  shape="rect" 
coords="126.5,217.5,319.5,234.5" />,
<area alt="LINK:node00364-node20108:2"  id="LINK:node00364-node20108:2"  
shape="poly" 
coords="224,222,254,231,275,237,298,244,334,255,335,251,348,263,330,266,332,262,296,252,272,245,252,238,221,229"
 
/>
<area alt="LINK:node00364-node20108:0"  id="LINK:node00364-node20108:0"  
shape="poly" 
coords="475,297,462,293,444,288,424,281,400,274,375,267,364,264,366,260,348,263,361,275,362,271,373,275,398,282,421,289,442,295,459,300,472,304"
 
/>

Is there some limitation on dealing with imagemaps? Am I doing something 
dumb, or is this a bug?

The same imagemap delivered to the browser as part of a 'traditional' 
page works just fine... has anyone else done this kind of thing 
successfully? Thanks in advance for any pointers to save my sanity :-)

Howie

Reply via email to