PDA

View Full Version : popup window question


gcapp
02-10-2003, 04:44 PM
I have a simple popup window question that I just can't figure out and I was hoping for some help??

I have this code:

<script>
function PopUp(PopUpUrl){
var ScreenWidth=window.screen.width;
var ScreenHeight=window.screen.height;
var movefromedge=0;
placementx=movefromedge;
placementy=movefromedge;
WinPop=window.open(PopUpUrl,"","width="+ScreenWidth+",height="+ScreenHeight+",toolbar=1,location=1,directories=1,status=1,scrollbars=1,menubar=1,resizable=1,left="+placementx+",top="+placementy+",screenX="+placementx+",screenY="+placementy+",");
WinPop.window.blur(); window.focus();
}
</script>

along with this button form code:
<form>
<p align="center">
<input type="button" value="Yes, I Accept"
onclick="PopUp('http://www.develop-wny.com/website/cattaraugus/viewer.htm')">
</form>


Now this produces a window which will be at maximum size for all size screens which is what I want. However, when the popup window comes up, it is behind the existing window. How can I have it where the new, full-size window appears in front?

If you're not sure what I am talking about, click on this link:

http://www.cattco.org/real-property/maphelp.htm

scroll to the bottom, click on the Proceed to Disclaimer button, then click on the "I Accept" button and you will see a window popup in the back, not in front of the existing window.

Can someone help me in changing this??

Thanks,
Gary

arnyinc
02-10-2003, 05:08 PM
WinPop.window.blur();
window.focus();


I would remove both of these lines. The WinPop.window.blur(); is taking the focus away from your new popup window.

glenngv
02-11-2003, 05:15 AM
...and put this instead:

WinPop.focus();