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?

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.

Similar Posts

  • How to set up Firefox Sync?

    How to set up Firefox Sync? The online Firefox help provides a very good tutorial on setting up Firefox sync across computers and other devides: http://support.mozilla.org/en-US/kb/how-do-i-set-up-firefox-sync Read more: Firefox: how to sync bookmarks saved on iOS devices to Firefox on PC? Is Firefox Sync safe, that is, could someone else read my password saved in…

  • Other Mobile Messengers Like WhatsApp

    What other mobile messengers like WhatsApp in the market? Messneger Apps focusing on mobile phones WhatsApp: http://www.whatsapp.com/ WeChat: http://www.wechat.com/en/ Kik: http://kik.com/ Kakao Talk: http://www.kakao.com/talk/en LINE: http://line.me/en/ Other “general” messengers that also have mobile clients Google Hangouts: http://www.google.com/ /learnmore/hangouts/ Facebook Messenger: https://www.facebook.com/mobile/messenger Skype: http://www.skype.com/en/download-skype/skype-for-mobile/ Read more: How to Use WhatsApp on iPad or iPod Touch How…

  • 使用MFC在一对话框中嵌入另一对话框

    全文介绍如何使用MFC在一对话框中嵌入另一对话框. 代码如下: static MyInDlg inDlg; // 需嵌入的对话框 inDlg.Create( IDD_DIALOG, AfxGetApp()->m_pMainWnd); CRect rc; // 嵌入对话框在原对话框中的位置 //GetClientRect(&rc); rc.left = 150; rc.top = 0; rc.bottom = 200; rc.right = 350; inDlg.MoveWindow( rc ); // 设置位置 inDlg.ShowWindow( SW_SHOW ); // 将对话框显示出来 对嵌入对话框设置如下: Style: Child Border: none Read more: MFC程序使用系统风格界面 Send Messages to Other Windows Using Win32 API 禁止对话框关闭按钮和Alt+F4 一个非常优秀的MFC…

  • CalDAV and CardDAV 101

    CalDAV and CardDAV are application layer computer network protocols that enable users to synchronize and manage their calendar (CalDAV) and contact (CardDAV) data across multiple devices and platforms. These open standards protocols leverage the (World Wide Web Distributed Authoring and Versioning) protocol, which provides a framework for users to create, change, and move documents on…

Leave a Reply

Your email address will not be published. Required fields are marked *