Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Passing value from one page textbox to another page textbox

Avatar of s_hausen
s_hausen asked on
JavaScriptWeb DevelopmentWeb Applications
14 Comments1 Solution361 ViewsLast Modified:
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.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971Flag of Guadeloupe imageMultitechnician
Commented:
This problem has been solved!
Unlock 1 Answer and 14 Comments.
See Answers