Forum Moderators: open

Message Too Old, No Replies

How to Read/Get data from Child Window(Pop up) to Main Window.

         

srins

2:29 pm on Aug 1, 2007 (gmt 0)

10+ Year Member



How to Read/get the data that is displayed in Child window(popup) to Parent Window(Main page) after giving Confirmation 'Ok' in the Child Window.

Any sample codes?.

Please help me in this regard.

Thanks,
Srins.

ajkimoto

3:33 pm on Aug 1, 2007 (gmt 0)

10+ Year Member



Hi Srins,

You should be able to do this using 'opener'. Here is an example of a command that will set the value of a textbox in the opener window from the opened window:

window.opener.document.forms[0].txtTest2.value='Hello from opened!'

You can also access Javascript functions in the opener window like so:

window.opener.myFunction('My Parameter')

Please keep in mind, though that the opened and opener windows need to be in the same domain for this to work due to browser security restrictions.

Hope this helps,

ajkimoto