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,

Nevermind guys found a way already:)

Thanks neil,

Whats the solution?

@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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.