How to pass results from the opened window to the openning window in JavaScript?

From the opening window by JavaScript window.open(), we can pass info to the opened by hash. But how to pass results back from the opened window to the openning window in JavaScript?

asked Oct 16, 2015 by anonymous

1 Answer

Assume in the opener window, a JavaScript variable is defined like

var exchangeVar = '';

In the opened window, you can update the exchangeVar in JavaScript by

opener.window.exchangeVar = 'updated value';

With this method, you can pass information from the opener window to the opened window and from the opened window to the opener window.

answered Oct 16, 2015 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...