PDA

View Full Version : How to click on Image Map and open New Window



logancat
01-08-2006, 04:45 AM
Does anybody know the code for clicking on an image map and having a new window open that is not blocked by browser popup blockers? Thanks!:confused:

jscheuer1
01-08-2006, 05:17 AM
Well, if a pop up blocker is set to be really aggressive, there is no way except perhaps to use the simple html attribute, target="_blank" ex:


<img src="photo9.jpg" usemap="#1" border="0">
<map name="1">
<area shape="circle" coords="65, 57, 26" href="some.htm" target="_blank">
<area shape="default" nohref>
<!-- image map created with meracl imagemap generator, get it for free at http://come.to/meracl -->
</map>

If, on the other hand, you are dealing with the generally default pop up settings in folks' browsers as would usually be the case on the web, and you want to script the window for greater control:


<img src="photo9.jpg" usemap="#1" border="0">
<map name="1">
<area shape="circle" coords="65, 57, 26" href="some.htm" onclick="window.open(this.href,'','width=300, height=200, top=150, left=250');return false;" target="_blank">
<area shape="default" nohref>
<!-- image map created with meracl imagemap generator, get it for free at http://come.to/meracl -->
</map>

logancat
01-08-2006, 05:57 PM
Thanks for your help. My Earthlink popup blocker still wouldn't let the window open...