[Javascript] window.open from image map goes very slow on Mac, great on PC

Stephen Swabey s.swabey at auckland.ac.nz
Mon Jul 23 00:53:40 CDT 2001


I've extended some code from other people's work to produce popup
windows (window.open) from an image map. Each location on the image map
(which is in a frame in a series of 5) pops up different content in the
window. This is achieved using onClick and a void(0) statement, which
avoids placing the entire javascript line in the user's location line.

The code (underneath) works fine on a PC (NN4) - the windows (both
self-closing and manually-closing varieties) pop up the right size etc.
and the clicks on the image map can be as rapid as needed.

However, on a Mac (both IE5 and NN4), only the first popup event works
well. Once the popup window is closed after the first time, no other
clicks are accepted. In fact, the cursor won't even change to the hand-
pointer on mouseover on the image map. Sometimes reloading the page
resets things and the image map will accept another click, but not
always. Sometimes a long period of waiting will see the image map
useable again, but not always.

I've tried using 'unshielded' code (ie, without the void(0) statement)
and an alternative with the HREF directly coded into the window.open
statement, but with the same result (although this last one was a
little quicker at resetting).

Can anyone tell me why the image map on the Mac browsers no longer
works after the first window.open event? What might be a better
solution (that works)?

Thanks - Stephen (code beneath)

<HTML>
<BODY>
<base target="_top">
<CENTER>
<map name="Objmap">
  <area shape="rect" coords="444,123,663,265" href="javascript:void(0)"
ONCLICK="window.open('test.htm','miniwin','toolbar=0,location=
0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=
315,height=215')">
  <area shape="rect" coords="528,284,680,507" href="javascript:void(0)"
ONCLICK="window.open('test2.htm','Iceberg','toolbar=0,location=
0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=
227,height=319')">
  <area shape="rect" coords="116,443,250,466" href="javascript:void(0)"
ONCLICK="window.open('test3.htm','Sublimation','toolbar=0,location=
0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=
200,height=200')">
<area shape="rect" coords="117,366,249,387" href="javascript:void(0)"
ONCLICK="window.open('test4.htm','Evaporation','toolbar=0,location=
0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=
200,height=200')">
</map>

<img src="test.gif" border="0" width="700" height="520" usemap=
"#Objmap">
</CENTER>
</BODY>
</HTML>






More information about the Javascript mailing list