Originally posted by kbrij
There got to be a solution for this. How can we basically submit a form to a page which is held as a pop-up window ?
Then the only solution is
echo "<form method=post action=\"test.php\" target=\"_blank\">\n" ;
Or... popup in a new window any similar form, use javascript to copy value from opener.document, then submit this twin form.
[example]
in the main file:
echo "<form name=aft method=post action=\"JavaScript:popUpPage('beforetest.php')\">\n" ;
echo "<input type=hidden name='varA' value='$ab'>\n" ;
echo "<input type=hidden name='varB' value='$aa'>\n" ;
echo "<br><input type='submit' name=e_button value='Replace'>" ;
echo "</form>\n" ;
in the before test file:
echo "<form name=bef method=post action=\"test.php\">\n" ;
echo "<input type=hidden name='varA' value='$ab'>\n" ;
echo "<input type=hidden name='varB' value='$aa'>\n" ;
echo "</form>\n" ;
<scipt>
document.bef.varA.value=window.opener.document.aft.varA.value
document.bef.varB.value=window.opener.document.aft.varB.value
document.bef.submit()
window.opener.document.location.replace("all_done.php")
</script>
[/example]