Is there any way to have a pop up window using Javascript "carry" a global variable to a new page? I'm trying to have JS carry a global variable ("ID") to a pop-up page so that new pop-up page shows the record that is identified by the unique "ID" field. Here's my code... maybe I'm missing something?
1st page :
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$callsign = $row['callsign'];
$type = $row['mission_type'];
$aa = $row['aa_kills'];
$ag = $row['ag_kills'];
$av = $row['av_kills'];
$an = $row['an_kills'];
$success = $row['success'];
$death = $row['death'];
$time = $row['flight_time'];
$date = $row['mission_date'];
$report = $row['report'];
$display_block .= "
<tr>
<td width=\"9%\" align=\"left\">$type</td>
<td width=\"9%\" align=\"center\">$aa</td>
<td width=\"9%\" align=\"center\">$ag</td>
<td width=\"9%\" align=\"center\">$av</td>
<td width=\"9%\" align=\"center\">$an</td>
<td width=\"9%\" align=\"center\">$success</td>
<td width=\"9%\" align=\"center\">$death</td>
<td width=\"9%\" align=\"center\">$time</td>
<td width=\"9%\" align=\"center\">$date</td>
<td width=\"9%\" align=\"center\"><a href=javascript:report($id)>REPORT</a></td>
</tr>";
and the Javascript that goes with the link...
<script LANGUAGE="JavaScript">
<!-- Hide from JS-Impaired Browsers
function report(){
window.open("report_report.php?id=$id","REPORT","toolbar=no,scrollbars=yes,width=600,height=400")
}
// End Hiding -->
</script>
I'm using the $_GET[] command in the pop-up window page to try to grab the "ID" number, but when the page appears, the page is empty (the "$display_block" variable is supposed to carry the data and then echo it). No undefined message or anything... just a blank page.
Strangely enough... if I just set the above link as a standard link and don't use JS, it works fine.