Question : Passing value from one page textbox to another page textbox

Hi,
I've two pages(forms), page2 pops up when we click on page1 form button A or B. On page 2, user can only fills out the TextBox 1 or TextBox 2.

After submitting the Page2 Form, I want to pass the value of Page2 Textbox 1 or 2 to populate on Page1 Textbox A or B(if user click on Button A, value should go to Page1, TextBox A).

Code of page is here 1

<script type="text/javascript">

function open_window() {
window.open('page2.htm','','width=600,height=200,toolbar=yes,location=yes,directories=yes,status=yes  ,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
}



</script>

<form>
<table width="1023" align="center">
  <tr>
    <td colspan="2" bgcolor="#E9E9E9">TextBox A</td>
    <td bgcolor="#E9E9E9">TextBox B</td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#E9E9E9">A.
      <input type="text" name="Page1_TxtA" id="Page1_TxtA" value="" size="20" maxlength="40" ></td>
        <td bgcolor="#E9E9E9">
      <input type="button" name="Page1_BtnA" value="Button A" onClick="open_window()"/>
    </td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#E9E9E9">B.
      <cfinput type="text" name="Page1_TxtB" id="Page1_TxtB" value="" size="20" maxlength="40" ></td>
        <td bgcolor="#E9E9E9">
      <input type="button" name="Page1_BtnB" value="Button B" onClick="open_window()"/>
    </td>
  </tr>
</table>

</form>

Page 2 code is here:
<script type="text/javascript">

function close_window() {
window.close();
}



</script>


<form name="form1">


<table width="576" border="1">
  <tr>
    <td width="273">TEXTBOX 1</td>
    <td width="485">TEXTBOX 2</td>
  </tr>
  <tr>
    <td><input type="text" name="Page2_Txt1"  id="Page2_Txt1" /></td>
    <td><input type="text" name="Page2_Txt2" id="Page2_Txt2" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input TYPE="BUTTON" name="npage" VALUE="Display" onClick="close_window();"></td>
  </tr>
</table>


</form>

any help, comment or suggestion regarding this problem, would be deeply appreciated.

Answer : Passing value from one page textbox to another page textbox

Random Solutions  
 
programming4us programming4us