post form1 to pop up window > post form2 on popup to self > change value form3 to main window.

Ok here goes!

I have a form (form1) in a main window (lets call it window no.1) that posts date values that will be calculated on a pop up window (window no.2).

Here is the code for the pop up:

<script language="JavaScript">
<!--
               function openWin(wName, wWidth, wHeight, wResize)
               {
                 features = 'scrollbars=1,status=0,resizable=' + ((wResize) ? 1 : 0) + ((wWidth) ? ',width=' + wWidth : '') + ((wHeight) ? ',height=' + wHeight : '');
                 popWin = window.open('', wName, features);
        if(popWin.focus) { popWin.focus(); }
        return true;
               }
          // -->
</script>

<form action="/PriceCalculator/popup.asp" method="post" name="CheckAvailibilty" target="newWin" onSubmit="return openWin(this.target, 370, 400, false)">

On the pop up I have a similar form (form2) that posts the values to the same page. I need some of the returned values to be 'inserted' to a seperate form (form3) on my original window (window no. 1) through a hyperlink without closing the pop-up window and without posting the page.

Somehow the first page (form and form field) needs to be referenced when opening the first pop-up I think.

I hope the above is clear. Any help will be appreciated.

Regards, Storm

StormvdmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZvonkoSystems architectCommented:
Hello Storm,

normally is for this purpose the window property "opener" to be used. But I assume this property is not correctly available after your popup window is filled by the subsequent html receive.

So is my proposal to access this opener window and their forms contained in opener window by naming the opener window with a distinguish name.

Like this:
<script language="JavaScript">
<!--
              function openWin(wName, wWidth, wHeight, wResize)
              {
                features = 'scrollbars=1,status=0,resizable=' + ((wResize) ? 1 : 0) + ((wWidth) ? ',width=' + wWidth : '') + ((wHeight) ? ',height=' + wHeight : '');
                popWin = window.open('', wName, features);
       if(popWin.focus) { popWin.focus(); }
       window.name="openerWindow";
       return true;
              }
         // -->
</script>

So you can reference in your popup html script like this:

top.openerWindow.document.formName.fieldName.value="xxx";

Give it a try.

Good luck,
Zvonko

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ZvonkoSystems architectCommented:
Oh, this opener window naming is possible because you can handle window collections like frames.
The window name is then the frame name.

0
jaysolomonCommented:
*******************************************************
******PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER******
*******************************************************
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area:
RECOMMENDATION:

 - [Points to Zvonko Grade A]

Please leave any comments here within the next seven days.
*******************************************************
******PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER******
*******************************************************

jAy
EE Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.