Hi all,
I am trying to call a javascript funtion poptastic which pops up a new window showing an image. I am having problems calling the javascript function from inside the php code. Probably something stupid but heres the code
$list .= "<td><a href=':poptastic('row1.htm');'><img src='getdata.php3?id=".$row['id']."'</a></td>";
Javascript function in PHP
Moderator: General Moderators
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Code: Select all
$list .= "<td><a href="javascript:poptastic('row1.htm');"><img src="getdata.php3?id=".$rowї'id'].""></a></td>";
Last edited by CoderGoblin on Tue Oct 26, 2004 7:47 am, edited 3 times in total.
-
The Monkey
- Forum Contributor
- Posts: 168
- Joined: Tue Mar 09, 2004 9:05 am
- Location: Arkansas, USA
Code: Select all
<?php
$list .= '<td><a href="" onClick="poptastic(''row1.htm'');"><img src="getdata.php3?id=' . $row['id'] . '" /></a></td>';
?>-
yeo_yeo2000
- Forum Newbie
- Posts: 6
- Joined: Fri Oct 22, 2004 9:26 am