PDA

View Full Version : Image Map Popups



oscar
Jun 15th, 2002, 03:07 PM
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

redhead
Jun 15th, 2002, 03:36 PM
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...

oscar
Jun 17th, 2002, 03:34 PM
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