|
|
#1 |
|
Bronze Member
![]() Join Date: Jul 2010
Posts: 45
|
I am generating a table in PHP that should have a reference to a JavaScript function. This is the line in question:
PHP Code:
href:"javascript:GetFlyPic('string')" and not href:'javascript:GetFlyPic('string')' What is the solution to this terrible problem?:
|
|
|
|
|
|
#2 |
|
Gold Member
![]() Join Date: Nov 2009
Location: New York
Posts: 370
|
PHP isn't my best but give this a go:
echo "<td><a href:'javascript:GetFlyPic('\"".$row[F_Name]."\"')'>$row[F_Name]</a></td>"; |
|
|
|
|
|
#3 |
|
Bronze Member
![]() Join Date: Jul 2010
Posts: 45
|
After many unsuccessful attempts I found out the problem was with href: which was supposed to be href=. Of course I had to use the escape character "\" in a couple of spots as well
|
|
|
|
|
|
#4 |
|
New Member
![]() Join Date: Nov 2010
Posts: 2
|
Hello.
You can use ' " or \" |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|