Re: using a php variable in javascript
| From: | Erwin Kerk | Date: | Mon, 22 Sep 2003 16:37:32 +0000 |
| Subject: | Re: using a php variable in javascript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163497@lists.php.net to get a copy of this message | ||
have you tried:
so = window.open('','<? echo $callerWin; ?>'); ??
Erwin Kerk
Web Developer
Rich Fox wrote:
I have a page with the following code: <? $callerWin = $_POST['CallerWin']; ?> <html> <body> <script type="text/javascript"> <!-- so = window.open('','CompanyEdit'); so.location.reload(); window.close(); // --> </script> </body> </html> I have 'CompanyEdit' hardcoded, but what I want instead is something like: so = window.open('','$callerWin'); This does not work, of course, but you get the idea: I want to use the value of the $callerWin php variable in my javascript. Can someone tell me the syntax for this? My reading of the documentation and trial-and-error have not met with success. thanks, Rich