Forum Moderators: open
I'm try to open a new popup window when clicking on a
button image(gif,jpg,png,etc)
Button Code:
<p align="center">
<img border="0" src="images/DemoButton.jpg" width="89" height="37">
</p>
Now, for a popup, I've got this, which works quite
nicely for some other things.
Popup Code:
<script>
var PopUpX = (screen.width/2)-285;
var PopUpY = (screen.height/2)-210;
var pos = "left="+PopUpX+",top="+PopUpY;
function PopUp(){PopUpWindow = window.open("http://xxx/yyy/xxx.htm","DEMO","width=570,height=420,"+pos);}
</script>
<a href="javascript:PopUp()">DEMO</a>
What I am having a problem with is linking the two together. I'd like the image file to perform the script
instead of the <a href...> text link.
I think I'm missing something simple, but can't seem
to see it...
<p align="center">
<map name="FPMap4">
<area href="javascript:PopUp()" shape="rect" coords="8, 5, 79, 29">
</map>
<img border="0" src="images/Button.jpg" width="89" height="37" usemap="#FPMap4">
</p>
Other ideas/input still welcome.....