Hello all,
I am a newbie and am going crazy attempting to get an echo statement working in php.
First the statement: echo "<a href=\"javascript:popUpFAQ('faq-1.htm'\">$player</a>";
This will not function.
It is the echo statement for a <td> where I wish to display a player's name in a column. The href is so the viewer can click on the name and see a pop-up showling his profile.
The code works in html with just a name in place of $player.
It works as is only the the url is carried causing error conditions in the pop-up.
Any help greatly appreciated.
Thanks in advance.
php href quotes etc......
Moderator: General Moderators
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: php href quotes etc......
You didn't finish the Javascript code in the href (missing ); at the end).
(remove the space between "javascript" and ":")
Code: Select all
echo "<a href=\"javascript : popUpFAQ('faq-1.htm');\">$player</a>";Re: php href quotes etc......
Jonah
sorry for late reply it worked perfecftly thaks for the help!
sorry for late reply it worked perfecftly thaks for the help!