Helpful Information
 
 
Category: JavaScript programming
Image Map Popups

Greetings all!
Whilst I don't have a problem with opening a popup, my request is that I have not been able to work out a way of making each hot spot in an image map link to a custom sized popup window. If it would help, the url of the page with the image map is: http://www.arden.com.au/seating.html
Thanks in anticipation

hmmm.... not too sure but you could try putting this into the <head>:



<script language="javascript">
function openWin(winURL,winHeight,winWidth) {
var winScrollbars = "yes";
var winToolbar = "no";
var winSizeable = "yes";
window.open(winURL,"","width="+winWidth+",height="+winHeight+",scrollbars="+winScrollbars+",toolbars="+winToolbar+",sizeable="+winSizeable)}
</script>


and adapt this for each entry on the map:


<map>
<area shape="..." coords="..." href="javascript:openWin('page.html','HEIGHT','WIDTH')" alt="..." title="...">
</map>


change "page.html" to the page, "HEIGHT" to the height you want the window to be, and "WIDTH" to the width you want it to be. Not to sure if it'll work though ;)

good luck

there should be no space in the javascript:openWin(...) but this forum put one in...

Redhead
Thank you very much for the script. At first it did not work, but your edit fixed that problem. Works like a treat.
Thanx again










privacy (GDPR)