Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2808
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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