Opening a Browser Window w/Image Map

Grafiti4u

New Member
Because of the way my client wanted her site set up, I created a site with a number of graphic pages with image maps on the links. I want a small browser window to open when this image map is clicked. My code (in DW CS3) works fine, but sometimes in IE the window opens in the background. This seems to happen if you have to tell IE "Yes, allow this pop up box". Is there something I can add to the code to be sure the window(s) always pop up on top of the main window? Thanks!

Here is the page (the link I am referring to is Photos or Events to the left of the picture):
http://www.youngsurvivorsbacktolife.com/events.htm

Here is my code for "Events" link:
<area shape="rect" coords="112,492,186,519" href="#" onMouseDown="MM_openBrWindow('photos.htm','1','menubar=yes,scrollbars=yes,resizable=yes,width=500,height=500')">

Thanks!
Kristi
 

o0JoeCool0o

New Member
I would create a new javascript function
<script type="text/javascript">
var pop;
function popup(url)
{
pop=window.open(url,'popwin','height=500,width=500');
if (window.focus) //if main window is focused
{pop.focus()} //focus popup
}
</SCRIPT>

then in your mousedown event change
onMouseDown="MM_openBrWindow('photos.htm','1','men ubar=yes,scrollbars=yes,resizable=yes,width=500,he ight=500')"

to

onMouseDown="popup('photos.htm');"

cheers!
 

Grafiti4u

New Member
I used your code and it works fine, but the pop up still wants to open up behind the main window on occasion.

I am curious about the PopUp code. Normally I use the "Open Browser Window" behavior in DW, but maybe I should be using the POP UP code instead. What is the difference?

Thanks!
 
Top