0

Good Day Guys

Im Having a hardtime getting this simple script working, basically im trying to open pop up windows when a link is click(which work fine until i found out that the same data is being fetch over and over again which is the last data inserted in the DB)

this the part of the script

while ($rows = mysql_fetch_assoc($query))
            {

echo"
<script language='javascript'> 

function win()
{
    window.open('overview.php?id=$rows[Id]','Window3','menubar=no,width=600,height=610,toolbar=yes,scrollbars=yes,');
} 
 </script>";



 echo "
 <tr>

 <td align='center'><a href='javascript:win()' >".$rows['RA']."</td>
 <td width='12%'>".$rows['Name']."</td>
 <td>".date('j F, Y', strtotime($rows['SDate']))." / ".$rows['Time']."</td>
 <td align='center'>".$rows['Service']."</td>
 <td width='3%'>".$rows['Remarks']."</td>

 </tr> ";

            }

What am i doing wrong?

Thanks neil,

Edited by ehpratah: typo

2
Contributors
3
Replies
21
Views
3 Years
Discussion Span
Last Post by ehpratah
0

@João_5 i revise my script to this

<td align='center'>

<a href='#' onclick=window.open('overview.php?id=".$rows['Id']."','mywindow','menubar=0,resizable=0,width=600,height=615')>".$rows['RA']."

</td>

notice that im not using the js function win() antmore

Edited by ehpratah: edit

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.