I'm new at PHP, checked the forums but couldn't find an exact answer to my question...here goes.
I have created a php page which displays the results of a database query. One of the lines of php code generates a link so that one of the records can be selected for editting...here's the code:
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\t<tr align=left>\n";
print "\t\t<td><font size=2>";
print $line["clientl"];
print "</font></td>\n\t\t<td><font size=2>";
print $line["clientf"];
print "</font></td>\n\t\t<td><font size=2>";
print $line["client_id"];
print "</a></font></td>\n\t\t<td><font size=2>";
print $line["co"];
print "</font></td>\n\t\t<td><font size=2>";
print $line["city"];
print "</font></td>\n\t\t<td align=center><font size=2>";
print $line["state"];
print "</td>\n\t\t<td><a href='client_frmEdit.php?idx=";
print $line["client_id"];
print "'><font size=2>Edit client</font></a></td>\n";
print "\t</tr>\n";
The 4th from the last line is the line in question. I want to have that link launch a popup window containing the data for editting. I would like to do this using javascript:
<script>
function openpopup(){
var popurl="../forms/client_frmEdit.php"
winpops=window.open(popurl,"","width=435,height=630,scrollbars,")
}
</script>
Where do I put this javascript? and how do I link to it.
Any help is really appreciated!!