View Single Post
Old 03-13-2003, 09:01 AM   #1 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
PHP / JS problem

Having a problem with javascript using a PHP var, code follows:

Page that inits the JS window.open:
PHP Code:
// segment from one page
echo "\t<td align=center valign=middle><form method=\"get\" action=\"test.php\">\n";
    echo 
"<input type=\"button\" value=\"Details\" onclick=\"window.open('test.php?row_id=" $row_id "','detailsWin','width=200,height=200,MENUBAR')\"></input></form></td>"
Child window that opens from window.open (and it opens, it just doesn't get the var $_GET['row_id'].
PHP Code:
<?php
// child window - should display the value of $row_id
    
$row_id $_GET['row_id'];
    echo 
$row_id;    
?>
bdl is offline   Reply With Quote