PDA

View Full Version : Parent/Child Windows - Passing Parameters


SYMBIO
10-14-2002, 12:43 PM
hi people.

you all probably know how to do this, but i dont. so here goes. basically, all im trying to do is, when someone clicks on "select a picture" link, the javascript pops up an ASP which uses fileobjects to show you what pictures are available to use.

the pop up is therefore a child window. i am using radio buttons, which hold the value "something.jpg". how do i pass the "something.jpg" back to my parent form into a textfield called "image1".

form names i know are important, parent form is called form and child form name="form1". the parameter name="picture."

help! cheers.

sat.

requestcode
10-14-2002, 02:08 PM
To populate a form fields in the "parent" window from your "child" window you would use the term "opener" like this:
opener.document.form_name.field_name.value="what ever"

You can also perform a function in the "parent" window from the "child" like this:
opener.function_name()