ivanrdgz
09-05-2003, 10:05 AM
H, guys.
I have a form width a text box, a link and a submit button. Here is the code (a simple example):
<html>
<head>
<title>TEST</title>
<script language="JavaScript">
/*==========================================================/
/ WinOpenSearchName - Open a new window for searchin CSTMR /
/ by Customer Name /
/==========================================================*/
function winOpenSearchName() {
var newWindow = window.open(
'',
'popup',
'top=325, left=395, width=450,height=350,scrollbars=yes,'
);
}
</script>
</head>
<center><h5>TESTING...</h5>
<form action="test.php" method="POST" name="frmMain">
<tr>
<td>  Customer Number:</td>
<td>  <input type=text name="CustomerNumber" maxlength=15>
<a href="#" onclick="winOpenSearchName();">[?]</a><br>
</td>
<tr>
<td align="center" colspan="2"><br>
<input align="center" type=submit value=" < OK > ">
</td>
</tr>
</table>
</form>
</center>
</body>
TEST.PHP
<?php
$CustomerNumber = $_POST['CustomerNumber'];
echo "Customer Number: " . $CustomerNumber;
?>
If we input some text into the text box and then we press the submit button, the TEST.PHP is prcoccessed and opened in another window. When you press the back button (IE) the entered text is still there, in the text box. Now if before you submit the form, you click on the link, and then submit the form, when you return back to it, the text box is empty. This is the problem. Any advices, sugestions?
Thanks.
I have a form width a text box, a link and a submit button. Here is the code (a simple example):
<html>
<head>
<title>TEST</title>
<script language="JavaScript">
/*==========================================================/
/ WinOpenSearchName - Open a new window for searchin CSTMR /
/ by Customer Name /
/==========================================================*/
function winOpenSearchName() {
var newWindow = window.open(
'',
'popup',
'top=325, left=395, width=450,height=350,scrollbars=yes,'
);
}
</script>
</head>
<center><h5>TESTING...</h5>
<form action="test.php" method="POST" name="frmMain">
<tr>
<td>  Customer Number:</td>
<td>  <input type=text name="CustomerNumber" maxlength=15>
<a href="#" onclick="winOpenSearchName();">[?]</a><br>
</td>
<tr>
<td align="center" colspan="2"><br>
<input align="center" type=submit value=" < OK > ">
</td>
</tr>
</table>
</form>
</center>
</body>
TEST.PHP
<?php
$CustomerNumber = $_POST['CustomerNumber'];
echo "Customer Number: " . $CustomerNumber;
?>
If we input some text into the text box and then we press the submit button, the TEST.PHP is prcoccessed and opened in another window. When you press the back button (IE) the entered text is still there, in the text box. Now if before you submit the form, you click on the link, and then submit the form, when you return back to it, the text box is empty. This is the problem. Any advices, sugestions?
Thanks.