Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: exchanging values between IE windows


Message #1 by "Antonello Corbo" <antonello65@l...> on Mon, 26 Mar 2001 21:57:53 +0200
Hello,

I would like to Know how i can pass values from a IE window to another.

I have a function in a html page tha call another function that open a

ie window with some values.

I would like that the user choice the values that he wants from the new

window and that these values go  to fill the fields of the main window.

Is it possible??

How?

thanks in advance





Message #2 by "George Draper" <georgedraper@m...> on Mon, 26 Mar 2001 22:19:45 -0500
You can do it by having the second window call a function in the first

window.  In your case, the second window was opened by the first so you can

call the function by using a button such as:



<input type="button" name="testfunc" value="test function"

onclick="window.opener.getChildWinData()">



where the function is getChildWinData().



That function would populate form fields in the opener window using some

code like the following:



document.forms[0].frm_element1.value 

ChildWin.document.forms[0].frm_element1.value;



and so on.  You just insert the values from the form elements in the child

window into the form elements in the opener window.



This works in IE, but I have not tried it in Netscape.



Let me know if this works for you.



- George Draper



-----Original Message-----

From: Antonello Corbo <antonello65@l...>

To: ASP Web HowTo <asp_web_howto@p...>

Date: Monday, March 26, 2001 3:30 PM

Subject: [asp_web_howto] exchanging values between IE windows





>Hello,

>I would like to Know how i can pass values from a IE window to another.

>I have a function in a html page tha call another function that open a

>ie window with some values.

>I would like that the user choice the values that he wants from the new

>window and that these values go  to fill the fields of the main window.

>Is it possible??

>How?

>thanks in advance

>

>

>

>



Message #3 by Gregory_Griffiths@c... on Tue, 27 Mar 2001 09:25:01 +0100
I think that you will need to use Javascript to achieve this. I believe 

that something like :



document.opener.myform.myfield.value=document.thisform.thisfield.value



should work, but I'm not 100% sure of the syntax.



> -----Original Message-----

> From: antonello65@l... [mailto:antonello65@l...]

> Sent: 26 March 2001 20:58

> To: asp_web_howto@p...

> Cc: antonello65@l...

> Subject: [asp_web_howto] exchanging values between IE windows

> 

> 

> Hello,

> I would like to Know how i can pass values from a IE window 

> to another.

> I have a function in a html page tha call another function that open a

> ie window with some values.

> I would like that the user choice the values that he wants 

> from the new

> window and that these values go  to fill the fields of the 

> main window.

> Is it possible??

> How?

> thanks in advance

> 

> 

> 
Message #4 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 27 Mar 2001 11:45:51 +0100
Yes, you can certainly refer to fields and elements in other windows that

are running in the same process.  You can refer back to the main window that

opened the child window by using the opener property



e.g. to refer to a field called field1 on a form



window.opener.forms(0).field1.value = ....



you can go the other way by using the name of the child window



-----Original Message-----

From: Antonello Corbo [mailto:antonello65@l...]

Sent: Monday, March 26, 2001 8:58 PM

To: ASP Web HowTo

Subject: [asp_web_howto] exchanging values between IE windows





Hello,

I would like to Know how i can pass values from a IE window to another.

I have a function in a html page tha call another function that open a

ie window with some values.

I would like that the user choice the values that he wants from the new

window and that these values go  to fill the fields of the main window.

Is it possible??

How?

thanks in advance



________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com

Message #5 by "Antonello Corbo" <antonello65@l...> on Tue, 27 Mar 2001 17:00:44 +0200
thanks!! i'll tray

----- Original Message -----

From: "Alex Shiell, ITS, EC, SE" <alex.shiell@s...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Tuesday, March 27, 2001 12:45

Subject: [asp_web_howto] RE: exchanging values between IE windows





> Yes, you can certainly refer to fields and elements in other windows that

> are running in the same process.  You can refer back to the main window

that

> opened the child window by using the opener property

>

> e.g. to refer to a field called field1 on a form

>

> window.opener.forms(0).field1.value = ....

>

> you can go the other way by using the name of the child window

>

> -----Original Message-----

> From: Antonello Corbo [mailto:antonello65@l...]

> Sent: Monday, March 26, 2001 8:58 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] exchanging values between IE windows

>

>

> Hello,

> I would like to Know how i can pass values from a IE window to another.

> I have a function in a html page tha call another function that open a

> ie window with some values.

> I would like that the user choice the values that he wants from the new

> window and that these values go  to fill the fields of the main window.

> Is it possible??

> How?

> thanks in advance

>

  Return to Index