Click to See Complete Forum and Search --> : Parent-Child then transferring info from child to parent? Help please!


yeepers
11-08-2003, 09:42 PM
Hi all!

I am not familiar with JS at all except for the little that I have gleaned from reading posts here.

Basically what I'm trying to do is this:

1. Parent window/page is totes.html
2. A link on parent page when clicked is to open up secondary/child page which is swatches.html
3. 2 selections will be made on the secondary page via radio buttons
4. The selections must then be transferred somehow to a text field in a form on the parent page.

Is this feasible? And if so, would any one be able to help me figure out the code?

Many thanks for your time!

Khalid Ali
11-08-2003, 11:31 PM
Check
this link (http://www.webapplikations.com/pages/html_js/window/ParentWinInteractionWithChildWin.html) out. It should answer most of your parent/child communication questions

yeepers
11-09-2003, 12:27 PM
Khalid,

Thanks for the example. It sorta kinda helped but because I've never written JS before I'm still very confused. This is definitely a crash course for me!

So I have the following on my parent page to call the child page

<script language="JavaScript">
function openSwatches(){
window.open("swatchpopup.html");}
</script>

<a href="javascript: openSwatches()">Click here to view the available fabrics!</a> This is the link I have on the page to open the new page. This seems to work fine.

The problem I'm having now is getting the selections on the child page to input to the parent page.

Here is what's going on. I have a bunch of radio buttons. They belong to 2 groups - exterior and interior. When one of each of the buttons has been selected I would like the values to be transferred to the parent page.

On the parent page is a form called frmProductsb. In the form are 2 text fields currently called product2 and product3. I would like the exterior radio button value to go to product2 and the interior radio button value to go to product 3.

I'm really at a loss as to how to being to even write the script for this.

Any helpful hints would be greatly appreciated!!!

Cheers.