Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2811
  • Last Modified:

Pass value from parent form to child form and get this back when i refresh the parent form. How do i do it?

Hi,

           I have parent and child form. I allow the user to update information in the child form. I update different table using child form and display information from this table(Paperspublished) in the main form. This is related by the memberID.    

   I close the popup window and refresh the main form to display the information that is updated in the child window.  I have 2 textarea boxes and 2 text boxes.

When i refresh the parent form i don't want to loose the information in the boxes so i want to get these form values in child window and from the child window i want to get this back when i refresh the parent window.

I want to refresh the parent form which is important. As the main form is a edit form that has information in the parent form.

For example:

Response.Write "<textarea name=Description cols=80 rows=10 id=Description>"&rs(server.HTMLEncode("Description"))&"</textarea></td>"

Response.Write "<textarea name=Experience cols=80 rows=10>"&rs(server.HTMLEncode("Experience"))&"</textarea></td>"


How do i get this value in child form and get this back in parent window?


0
casstd
Asked:
casstd
1 Solution
 
jkna_gunnCommented:
if the values that you pass back are put into a form on the parent page, then when you refresh you should be able to access them from Request.Form("name").
as for passing values back to parent look at this question

http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20941126.html
0
 
ZvonkoSystems architectCommented:
please delete the other duplicate window: http:Q_20943524.html
When some expert posts a comment in that question, then you will have to ask the Community Support for question deltion.
0
 
ZvonkoSystems architectCommented:
I understood your question in that way, that you want to know how to transfer the textarea value from parent to child popup window, right?
Ok, the popup uses this to get parent textarea value:
<body>
<form>
<textarea name=Description cols=80 rows=10 id=Description>
</textarea>
<textarea name=Experience cols=80 rows=10>
<textarea>
<input type=submit>
</form>
<script>
theForm=document.forms[0];
openerForm=opener.document.forms[0];
theForm.Description.value=openerForm.Description.value;
theForm.Experience.value=openerForm.Experience.value;
</script>
</body>

That will load the parent textarea values in child popup form textareas.
To refresh the opener you have to send this script as form submission Response:
<script>
opener.location.reload(true);
window.close();
</script>


That will reload the updated parent form and close the child popup window.


0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
aneethatCommented:
Hi Zvonko,
   
             I pass the parent form value to child becuase when i close popup and refresh the parent i want to get this back. The other parent form value i sent through querystring and convert to session variable in popup window.

           I face the problem in textarea. that has lot of information in it. So i could not send this through querystring.

That is why some way i want to get back my textarea value when i reload it. The other parent form value i convert to session for textarea i struct to get it back in the parent.

I want some way to get back the textarea value when i reload it. I don't use this textarea information in my popup.

Could you please help me how do i do it.



0
 
ZvonkoSystems architectCommented:
Are you casstd?
0
 
casstdAuthor Commented:
Hi Zvonko,

               We are working together to solve this issue. So don't mistake us. Could you please help me to solve this?

Thank you.

0
 
casstdAuthor Commented:
Hi,

       I have created a dumy form in the parent window. I have all hidden fields similar to parent window and i submit this form when i open child window. When i submit the dumy form in back i convert all the form values to session variable and get this back in Parent form.


Thank you all for your help.


0
 
CetusMODCommented:
Closed, 100 points refunded.
CetusMOD
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now