[Javascript] Opening a new Window

Rodney Myers rodney at aflyingstart.net
Sat Apr 19 07:20:53 CDT 2003


Tim ,

Using the URL view-source:http://mmm.eircom.ie/maps/map_Pop.asp reveals :

<html>
<head>
<script language="javascript">
// <!--
function eircom_popup(page_name) {

    var windowAtts;
    var Width = 590;
    var Height = 475;
    var leftPos,rightPos;
    leftPos = (screen.width/2) - (Width / 2);
    rightPos = (screen.height/2) - (Height / 2);
    windowAtts = 
"width="+Width+",height="+Height+",toolbar=no,left="+leftPos+",top="+rightPos+",location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no";
   var courseWindow = window.open(page_name,"",windowAtts);

    //Define current window
    parentwin = window.self;
    //Declare current window as its own child
    parentwin.opener = window.self;
    //Close current window
    parentwin.close();
      
}
//-->
</script>
</head>
<body onLoad="javascript:eircom_popup('default.asp')">
</body>

</html>

hth

Rodney


Tim Makins wrote:

>This page:
>http://mmm.eircom.ie/maps/map_Pop.asp
>
>when opened seems to open a new window and close the old one. How do you do
>that ?
>
>Tim in Ireland.
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
>
>  
>

-- 
PS. I have just bought a licence for Mike Chen's
BizAutomator. If you have to answer routine 
email queries from your sites or mailings then
you need this as much as I do. 
http://www.BizAutomator.com/rlbm51 

Rodney






More information about the Javascript mailing list