Hi everyone,
I have created a popup that has an image map in it, and I need to close that popup when someone clicks on a link, and redirect the parent window to the link. I have written some code that works fine on IE, but doesn't work on Netscape and Mac. Could someone help me debugging it?
Thanks
Here's the code
:
#####################################
to open the window
#####################################
<script language="JavaScript">
function popSize(winURL,winName) {
// assign values to window height, width, and coordinate vars
var popWidth =435;
var popHeight = 255; // default for users with smaller screens
var popLeft = (screen.availWidth / 2) - (popWidth / 2);
var popTop = (screen.availHeight / 2) - (popHeight / 2);
// assemble list of window features
var winFeat = "directories=no,location=no,menubar=no,personalbar=no,resizable=no,scrollbars=no,status=no,toolbar=no,";
winFeat += "width=" + popWidth + ",";
winFeat += "height=" + popHeight + ",";
winFeat += "left=" + popLeft + ",";
winFeat += "top=" + popTop;
// open the new window
window.open(winURL,winName,winFeat);
}
</script>
<script language="javascript">
popSize('/popup_8/1,2836,,00.html','POP');
</script>
###########################
to close the window :
############################
<area shape="rect" alt="" coords="15,12,130,162" href="javascript:window.opener.location('/popup_redirect?navsource=issue');self.close();">
##################################
as i said, this works fine on IE, but doesn't work on Netscape or MAC
I have created a popup that has an image map in it, and I need to close that popup when someone clicks on a link, and redirect the parent window to the link. I have written some code that works fine on IE, but doesn't work on Netscape and Mac. Could someone help me debugging it?
Thanks
Here's the code
:
#####################################
to open the window
#####################################
<script language="JavaScript">
function popSize(winURL,winName) {
// assign values to window height, width, and coordinate vars
var popWidth =435;
var popHeight = 255; // default for users with smaller screens
var popLeft = (screen.availWidth / 2) - (popWidth / 2);
var popTop = (screen.availHeight / 2) - (popHeight / 2);
// assemble list of window features
var winFeat = "directories=no,location=no,menubar=no,personalbar=no,resizable=no,scrollbars=no,status=no,toolbar=no,";
winFeat += "width=" + popWidth + ",";
winFeat += "height=" + popHeight + ",";
winFeat += "left=" + popLeft + ",";
winFeat += "top=" + popTop;
// open the new window
window.open(winURL,winName,winFeat);
}
</script>
<script language="javascript">
popSize('/popup_8/1,2836,,00.html','POP');
</script>
###########################
to close the window :
############################
<area shape="rect" alt="" coords="15,12,130,162" href="javascript:window.opener.location('/popup_redirect?navsource=issue');self.close();">
##################################
as i said, this works fine on IE, but doesn't work on Netscape or MAC