DavidB wrote:
Quote:
I get an "unexpected =" error message from this script. It apparently
has nothing to do with a href=, but is triggerred by one more of the
following = signs. How do you fix this kind of parse error? Thanks. |
By fixing your quotes correctly:
echo 'See a complete list: <a href="javascript
:;"
onclick="MM_openBrWindow(\'/a1/inc/scripts/ecoregions.php?Animal='.$GZAnimals['Name2'].'
&Rank='.$GZAnimals['Rank'].'\',\'JBNations\',\'scrollbars=yes,resizable=yes, width=400,height=250\'")>Pop-Up</a>';
Actually, you're misusing PHP to echo all that straight HTML. It would
be far more efficient, and less prone to error to use PHP to echo only
those parts of the script that change.
See a complete list: <a href="javascript
:;"
onclick="MM_openBrWindow('/a1/inc/scripts/ecoregions.php?Animal=<?php
echo $GZAnimals['Name2']; ?>
&Rank=<?php echo $GZAnimals['Rank'];
?>','JBNations','scrollbars=yes,resizable=yes,widt h=400,height=250'")>Pop-Up</a>';
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (foED - forthcoming)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://computerbookshelf.com