Try this:
<script>
function poptastic(url)
{
newwindow=window.open(url,'name','height=490,width=900,left=150,top=175');
if (window.focus) {newwindow.focus()}
}
</script>
<?
$URL="index.php";
print "<a href=\"javascript:poptastic('".$URL."')\">click here</a>";
?>
Ed
> 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.
--
Best regards,
wwww mailto:[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php