Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Javascript and PHP: Open a new window
- From: javascript@xxxxxxxxxx (Patricia Calatayud)
- Subject: [Javascript] Javascript and PHP: Open a new window
- Date: Mon, 25 Nov 2002 15:27:53 +0100
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=B4t work.
In Normal php document:
<head>
<script><!--
var newWindow =3D null;
function openWindow(contentURL,windowName,windowWidth,windowHeight) {
widthHeight =3D 'height=3D' + windowHeight + ',width=3D' + windowWidth;
newWindow =3D window.open(contentURL,windowName,widthHeight);
newWindow.focus()
}
function closeWindow() {
if (newWindow !=3D null) {
newWindow.close();
newWindow =3D null;
}
}
function toggleWindow(contentURL,windowName,windowWidth,windowHeight)
{
if (newWindow =3D=3D null) {
widthHeight =3D 'HEIGHT=3D' + windowHeight + ',WIDTH=3D' + windowWidth;
newWindow =3D window.open(contentURL,windowName,widthHeight);
newWindow.focus()
}
else {
newWindow.close();
newWindow =3D null;
}
}
// -->
</script>
</head>
<body onUnload=3D"closeWindow()">
<a class=3D"menu2"
href=3D"javascript:openWindow('newWindow.php','myNewWindow',150,50)">Obe
rbegriffe und Unterbegriffe</a> |
<a href=3D"javascript:closeWindow()">Close</a> |
<a
href=3D"javascript:toggleWindow('newWindow.php','myNewWindow',150,50)">T
oggle</a>
In new window document:
<head>
<script>
funtion closeWindow() {
self.close();
}
</script>
</head>
<body onLoad=3D"window.moveTo(100,100)" onUnload=3D"opener.newWindow =3D
null;">
Is there a good book about PHP, Javascipt and DHTML?
Thanks
- Follow-Ups:
- Prev by Date: [Javascript] Need help in Hiding Controls inHTML
- Next by Date: [Javascript] Javascript and PHP: Open a new window
- Previous by thread: [Javascript] APRENDA O MEJORE SUS IDIOMAS
- Next by thread: [Javascript] Javascript and PHP: Open a new window
- Index(es):