Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Re: Javascript digest, Vol 1 #817 - 7 msgs


  • From: javascript@xxxxxxxxxx (Lewis Shadoff)
  • Subject: [Javascript] Re: Javascript digest, Vol 1 #817 - 7 msgs
  • Date: Mon, 25 Nov 2002 10:37:06 -0600

You can use the values stored in php variables in constructing a web 
page.  Suppose the following php variables have been defined and their 
values assigned using php:

$contentURL, $windowName, $windowWidth, $windowHeight

You can construct the JavaScript window open statement inside the <script> 
tags like this:

<?php
printf ( "window.open(%s,%s,%s,%s);", $contentURL, $windowName, 
$windowWidth, $windowHeight );
?>

or alternatively:

<?php
echo "window.open($contentURL,$windowName,$windowWidth,$windowHeight);";
?>



The definitive php manual is at:

<http://www.php.net/>

Lew


At 08:57 AM 11/25/2002, Patricia Calatayud wrote:
>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()
>}

Lewis A. Shadoff, Ph.D.
Brazosport College
Lake Jackson, TX