Pop up window in PHP code
| From: | Chris Carter | Date: | Sat, 03 Feb 2007 20:44:37 +0000 |
| Subject: | Pop up window in PHP code | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-248253@lists.php.net to get a copy of this message | ||
I am trying to open a Java script pop up widow from within the php code. Not
able to get it done, the error I think is in the use of "" '' .. I mean
double and/or single quote. Do not know how to place those. Please advice.
The code is below:
echo "
<tr>
<td>$shopname </td>
<td>$category </td>
<td>$subcategory </td>
<td>$level </td>
<td> javascript:poptastic( Details </td>
</tr>";
$i++;
The Javascript code is:
<script language="javascript">
var newwindow;
function poptastic(url)
{
newwindow=window.open(url,'name','height=490,width=900,left=150,top=175');
if (window.focus) {newwindow.focus()}
}
</script>
The javascript code works perfect with other pages and within HTML, its just
that the PHP is not supporting the quotes and double quotes. I have even
tried &rsquo &rdquo and all.
Thanks in advance
--
View this message in context: http://www.nabble.com/Pop-up-window-in-PHP-code-tf3167481.html#a8786668
Sent from the PHP - General mailing list archive at Nabble.com.