try

<?
print "<FORM action=\"hint.phtml\" METHOD=\"post\">";
$summary = "Hellow universe";
print "<INPUT TYPE=\"hidden\" name=\"summary\" value=\"$summary\"> ";
print "<input type=\"submit\" value=\"Try This\"
onClick=\"window.open('hint.phtml?summary=$summary', 'remote',
'menubar,scrollbars,resizable,width=350,height=200,left=20,top=20');
return false;\">";
print "</form>";
?>

hope that helps

best regards

Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India

----- Original Message -----
From: "Carl Natale" <[EMAIL PROTECTED]>
To: "Php" <[EMAIL PROTECTED]>
Sent: Wednesday, February 21, 2001 7:41 AM
Subject: [PHP] php and javascript


> I need some help passing a variable to a popup window. The following form
> collects input from the user and stores it in the variable $summary.
>
> <?
> print "<FORM action=\"hint.php\" METHOD=\"post\">";
> $summary = "Hellow universe";
> print "<INPUT TYPE=\"hidden\" name=\"summary\" value=\"$summary\"> ";
> print "<input type=\"submit\" value=\"Try This\"
> onClick=\"window.open('hint.php', 'remote',
> 'menubar,scrollbars,resizable,width=350,height=200,left=20,top=20');
> return false;\">";
> print "</form>";
> ?>
>
> When you click on the "Try This" button, hint.php opens up in another,
> smaller window just like I wanted. But the variable $summary doesn't show
> up
>
> <?
> file://hint.php script says this
>
> file://THIS LINE PRINTS
> print "Here's the hint:<BR>";
> file://BUT NOT THIS ONE
> print $summary;
> ?>
>
> If I take JavaScript out of the submit coding, the browser window moves
> to hint.php and prints the $summary variable.
>
> I'm much more comfortable with PHP than JavaScript. How can I deliver the
> text in $summary to a second, smaller window?
>
> Thank you.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to