I have a php page, which using javascript, creates a popup window which contains another php page. the php page in the popup window is basically a form, and will use that value to insert into a database. Using the following function to load the php page in a popup:
phppopup('edit_status.php?cmd=EditStatusData')
function phppopup(page){
child1 = window.open (page, "Ebay Auctions", "height=600,width=600,status=yes,toolbar=no,menubar=no,location=no");
child1.document.close();
}
How can i pass a value from the calling page to the page in the popup?
I am trying at the moment:
echo "<p><a href=\"#\" onclick=\"updateByEdit('". $username ."', '". $subcat ."')\">Edit User Info</a>
<p><a href='#' onclick=\"makewindows2('edit_status.php?cmd=EditStatusData&pk=". $pk ."'); return false;\">Historie</a>;
Which generates the following html:
<a href="#" onclick="updateByEdit('trendsandbrands', 'fakeapproved')">Edit User Info</a>
</strong></strong></strong></strong></p><p><strong><strong><strong><strong><a href="#" onclick="phppopup('edit_status.php?cmd=EditStatusData&pk='); return false;">Historie</a>
It works fine for updateByEdit, why not for phpopup?
$pk is just an integer, which display fine in the page it the window is called from.