Javascript Image map on image from database
<p>I call an image using the displayMainImage.php link below and that works fine, it pulls the image name from a mysql database.  I am now trying to connect an image map to the image, that part isn't working.  Is this possible and if so how.  The below code is in javascript running on a php site. </p>

<pre><code>&lt;?php echo '
&lt;script language="javascript"&gt;

function openit() {
newWindow = window.open(\'http://www.mysite.com/front_page/\', \'dfac\', \'width=900,height=700\');
}

&lt;/script&gt;  
'; ?&gt;  &lt;br/&gt;


&lt;script language="JavaScript" type="text/javascript" 
src="http://www.mysite.com/idevaffiliate/displayMainImage.php?token=logo" usemap="#Map"&gt;
</code></pre>

<p></p>

<pre><code>&lt;map name="Map" id="Map"&gt;  
  &lt;area shape="rect" coords="175,247,366,280" href="javascript:openit();" /&gt;
&lt;/map&gt;
</code></pre>
