?
Solved

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

Posted on 2004-04-05
10
Medium Priority
?
2,805 Views
Last Modified: 2007-12-19
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
Comment
Question by:casstd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 6

Expert Comment

by:jkna_gunn
ID: 10755581
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
 
LVL 63

Expert Comment

by:Zvonko
ID: 10757460
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
 
LVL 63

Expert Comment

by:Zvonko
ID: 10757528
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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Expert Comment

by:aneethat
ID: 10763270
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
 
LVL 63

Expert Comment

by:Zvonko
ID: 10763438
Are you casstd?
0
 
LVL 6

Author Comment

by:casstd
ID: 10763832
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
 
LVL 6

Author Comment

by:casstd
ID: 10803859
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
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 10846240
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question