
January 1st, 2003
05:27 AM
Neverside Newbie
Status: Offline!
Need help "translating" something.
Ok, I want to make this javascript compatable with PHP.
here is the Javascript code.
<script>
//Popup Window Script
//By JavaScript Kit ([url]http://javascriptkit.com[/url])
//JavaScript tutorials and over 400+ free scripts
function openpopup(){
var popurl="$content[movieurl]"
winpops=window.open(popurl,"","width=$content[width],height=$content[height],")
}
openpopup()
</script>
Ok, now the thing is, I cant just like echo it in as PHP normal. Because it thinks that the function openpopup() is part of the PHP. And I need this in bPHP because the $content[WHATEVER] is results from the SQL tables. So could someone translate this in PHP so it would work? Thank you.

January 1st, 2003
05:57 AM
Neverside Newbie
Status: Offline!
WHAT! There you are again. Such a good man. thank you alot.

January 1st, 2003
07:15 PM
ROFL, All he did was echo what you gave..and added some slashes 
BTW: PHP is Server-Side, you can't open browser windows with PHP..Not to my knowledge at least...
___________________
Current Project: Getting a damn Portfolio/Resume Online.

January 1st, 2003
07:32 PM
Neverside Newbie
Status: Offline!
he isnt looking to open windows using PHP, just write the javascript between the PHP echo tags

January 1st, 2003
10:19 PM
Neverside Newbie
Status: Offline!
Well see, I tried that once before with the echo and stuff, but for some reason it kept thinking the funcion was a PHP function.

January 1st, 2003
10:40 PM
echo is a php function, else you are talking about JS
___________________
Current Project: LivermoreMuscle.com
Sig Hosted by Motorspin

January 1st, 2003
10:51 PM
I'm a Neverside Newbie?
Status: Offline!
What you can do is include an text document, etc containing the javascript. No escaping, etc.
script.txt
script.js (you can just echo an html tag to include a js file as well)
<script>
//Popup Window Script
//By JavaScript Kit ([url]http://javascriptkit.com[/url])
//JavaScript tutorials and over 400+ free scripts
function openpopup(){
var popurl="$content[movieurl]"
winpops=window.open(popurl,"","width=$content[width],height=$content[height],")
}
openpopup()
</script>
<?php
incluce("script.txt");
?>