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
2,796 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
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
 

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now