To add the multiple items to Invoice i am opening pop-up window. Once i add the items, pop-up gets closed and returning to the parent page. But once the pop-up window closes, it should redirect to new page instead of parent page.
Now i am doing like this
In page1.php (parent page)
<input type="button" class="btn btn-success" name="lineitems" id="lineitems" value="Add Line Items" onclick="window.open('add_lineitems.php?order_id=<?php echo $order_id; ?>', 'LineItems','height=500,width=1300,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');">
In add_lineitems.php(popup) after adding, i am closing window like this
if($l1)
{
echo "<script>window.close();</script>";
}
?>
<script>
window.onunload = refreshParent;
function refreshParent() {
window.opener.location.reload();
}
</script>
Instead of page1.php, i want this to redirect page2.php. How can i mention it?