Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9229291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:32:07+00:00 2026-06-18T05:32:07+00:00

I am calling child page and posting the form. Trying to refresh and rebuild

  • 0

I am calling child page and posting the form. Trying to refresh and rebuild the parent page based on value entered in child page. I am not able to see the child posted values in Parent page.

Expecting value $_POST[‘test_2’] populated when child is submitted from Parent page.
I don’t see the value posted by child page in parent page. See the code example below.
Thanks for your help..
Advice me if there are any other better way to access the value submitted by child page and rebuilding the parent page using those child page values.

Parent Page is : Example1Parent.php

<html>
<head>
<body>
<h1> Welcome Parent </h1>
<div id="dateDiv"></div>
<form method=post action='' name=f1>
<table border=0 cellpadding=0 cellspacing=0 width=550>
<tr>
<td ><font size=2 face='Verdana'>Refresh upon Search</font>
<input type=hidden name='p_name2' id=n2 size='8'> 
<input type=button 
onClick=window.open("Example1Child.php","Ratting","width=550,height=170,left=150,top=200,toolbar=0,status=0,"); value="Advanced Search">
<?php
echo '<br> Welcome ';
if (!isset($_POST['test_2'])) echo "<br> t_test2 : it does not exists! ";
?>
</td></tr> 
</table>
</form>
</body>
</html>

Child Page is :Example1Child.php

 <html>
 <head>
 <title>ChildForm</title>

 <SCRIPT language=JavaScript>
 <!-- 
 function win(){
 window.opener.location.href="Example1Parent.php";
 self.close();
 //-->
 }
</SCRIPT>
</head>
<body>
<h1> Welcome to Child </h1>
<form name="child"  id="child"  METHOD="POST" action=''>
<input type="text" id="test_2" name="test_2" value="ENTER DATA TO PARENT PAGE">
<INPUT TYPE="SUBMIT" onClick="win();" value="SEND VALUE TO PARENT">
</form>

</body> 
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:32:08+00:00Added an answer on June 18, 2026 at 5:32 am

    as tmuguet mentioned you might want to create a different method since this is a fairly old way of doing this. Now a days you can have popups/modal boxes and such to get a value then update the page with js/ajax or whatnot.

    I’m guessing you are trying to pass values through windows via js which won’t work since you open the window opening a clean link (no values passed even tough you have ‘POST’ in the form method) and you can use something like the following, but it will only give you GET values

    <SCRIPT language=JavaScript>
    <!-- 
        function win(){
            val = document.getElementById('test_2').value;//you will most likely need to encode this value if it has special characters
            window.opener.location.href="Example1Parent.php?test_2=" + val;
            self.close();
    //-->
    }
    </SCRIPT>
    

    What you are looking for is something like Window.open and pass parameters by post method problem

    <form id="child" method="post" action="Example1Parent.php" target="Parent">
        <!-- <form name="child"  id="child"  METHOD="POST" action=''> -->
        <input type="text" id="test_2" name="test_2" value="ENTER DATA TO PARENT PAGE">
        <INPUT TYPE="SUBMIT" onClick="win();" value="SEND VALUE TO PARENT">
    </form>
    
    <script type="text/javascript">
        function win(){
            var f = document.getElementById('child');
            f.test_2.value =  document.getElementById('test_2').value;
            window.open('Example1Parent.php', 'Parent');
            f.submit();
            self.close();
        }
    </script>
    

    I have not tested this script

    You might want to do a var_dump($_POST) in your Example1Parent.php file to see if f.test_2.value translates to $_POST['test_2']

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am calling the parent function like window.parent.functionname(); from the child page. How can
i have a parent form, it will have two tabs calling the two child
I have a parent page where I am submiting a form and calling two
Say I request parent/child/child/page-name in my browser. I want to extract the parent, children
I have a page (parent) with an iFrame (child) embedded in it, the iFrame
Calling the WriteObject Method from a background thread is not possible! Is there a
I am giving myself fits trying to do something which I am not even
I have 2 views(parent and child). I have an iAd displaying on the parent
i am calling a php page res.php using jquery and ajax. The code is:-
I'm trying to delete a child property of a domain entity. In the UI,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.