RE: [PHP] How pass form variable to window.open()
| From: | Jay Blanchard | Date: | Thu, 05 Aug 2004 15:11:18 +0000 |
| Subject: | RE: [PHP] How pass form variable to window.open() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-192876@lists.php.net to get a copy of this message | ||
[snip]
Anyone can tell if, inside php script, I can pass form variable to the
javascript window.open() call?
That is,
in the form, for example, i have <input type=text.. name=student ....>
and <input type=button onClick=window.open('url?student=$student', .....)
It seems to me not working.
[/snip]
You have to echo or print the sJavaScript statement with PHP,
print("<input type=\"button\"
onClick=\"window.open('url?student=$student', ....)