[Javascript] Javascript and PHP: Open a new window

Terry bader at tcbader.com
Mon Nov 25 08:33:23 CST 2002


I am not a php developer but this has to do with session management...  you need to lookup how php handles sessions....  this really wont be a JS dependent problem...

~ Terry
757 581-5981
AIM/Yahoo: lv2bounce


----- Original Message ----- 
From: "Patricia Calatayud" <patricia.calatayud at itv-denkendorf.de>
To: <javascript at LaTech.edu>
Sent: Monday, November 25, 2002 9:27 AM
Subject: [Javascript] Javascript and PHP: Open a new window


How can I open a new window from a php/html document and 
get that the terms in the new window are generated dynamically by 
php?

I have used the following, but it doesn´t work.
 
In Normal php document:
<head>
<script><!--
var newWindow = null;
 
function openWindow(contentURL,windowName,windowWidth,windowHeight) {
widthHeight = 'height=' + windowHeight + ',width=' + windowWidth;
newWindow = window.open(contentURL,windowName,widthHeight);
newWindow.focus()
} 
 function closeWindow() {
if (newWindow != null)  { 
   newWindow.close();
  newWindow = null;
 }
 }
 
function toggleWindow(contentURL,windowName,windowWidth,windowHeight)
 {
  if (newWindow == null) {
   widthHeight = 'HEIGHT=' + windowHeight + ',WIDTH=' + windowWidth;
   newWindow = window.open(contentURL,windowName,widthHeight);
   newWindow.focus()
  }
  else { 
      newWindow.close();
      newWindow = null;
  }
 }
 
 // -->
 </script> 
 </head>
 <body onUnload="closeWindow()"> 


<a class="menu2" 
href="javascript:openWindow('newWindow.php','myNewWindow',150,50)">Obe
rbegriffe und Unterbegriffe</a> | 
<a href="javascript:closeWindow()">Close</a> |
<a 
href="javascript:toggleWindow('newWindow.php','myNewWindow',150,50)">T
oggle</a>

In new window document:
<head>
<script>
funtion closeWindow() {
self.close();
}
</script>

</head>

<body onLoad="window.moveTo(100,100)" onUnload="opener.newWindow = 
null;">


Is there a good book about PHP, Javascipt and DHTML?
Thanks

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20021125/62aafeb3/attachment.htm>


More information about the Javascript mailing list