Click to See Complete Forum and Search --> : Child/Parent window communication problem


ceballos79
10-30-2003, 08:31 AM
I spawn a page labeled A that has a form A.

within that popup I spawn a page B with form B

in window B, submitting it puts the data back into window A, form A.

the code that does that is

<script>
function SendData() {
window.opener.document.formA.value1.value = document.FORMB.value2.value;
}
</script>


This works fine and dandy. But if I navigate to a different page in window B, THEN submit back to window A. it won't work. that's a problem.

i tried to remedy this by telling the JS to direct back to window A directly by:

<script>
function SendData() {
A.document.formA.value1.value = document.FORMB.value2.value;
}
</script>

Edited By Moderator
<comments>
Please refrain from resorting to in appropriate language.
<comments>
BUT THE ***** WON'T LISTEN! /cry.

what am I doing wrong?

/rc

Khalid Ali
10-30-2003, 09:00 AM
Originally posted by ceballos79
But if I navigate to a different page in window B,
/rc

What do you mean by that..are you opening someother page in the popup???

ceballos79
10-30-2003, 09:20 AM
i'm doing a dynamic search using webdna (it's all one page, but in reality, i'm physically navigating to a new page in window B)

you can see an example of what i'm talking about here:

http://www.rep-works.com/repworks/dad.html

that's a simple example. it works fine. yet if u were to navigate to another page in the popup window, it wouldn't work.

ceballos79
10-30-2003, 01:44 PM
still struggling, any ideas? anyone? :(

Khalid Ali
10-30-2003, 08:42 PM
I went to the link provided..

entered text in both text fields on parent window
clicked enter

a child window opened .
parent window text was changed to 13,

I enterd new text in chidl window,
parent window showed that in the text field..

Now help me out here( it seems like lately I am on dope..heheh),what are you seeking that these pages did?

ceballos79
10-30-2003, 10:10 PM
the process of when you entered info into the child window and submitted it and it reflected into the parent window is what i'm looking for. and in fact i could duplicate this fine. but here's the catch:

in real world concepts they're filling out a project form, clicking to window B really means they're opening up a contact manager program, where they search (navigate to different page) for a contact to have all of their info entered into the form automatically.

opening up the child and submitting back to the parent right then will work fine. but this process breaks when you open the child, navigate to another page within the child window, THEN try to submit to the parent window. and that's the whole problem.

ceballos79
10-31-2003, 10:57 AM
works.

the initial search is now on the actual project form (was the initial page opened in the pop up) ... initial search now invokes the pop up onSubmit and the pop up opens to a founditems loop with the proper JS in the record. onSubmit the form sends child data back to parent form and auto self closes the child window.