最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - js communicate between popup to main window - Stack Overflow

programmeradmin3浏览0评论

I got two browser windows on the same domain,

one is the main window and the second is small popup window.

i found this: How to Communicate between two browser windows?

but, the problem is the popup opens as event on the local puter by 3rd party software... and i don't wish to municate back to the server, and reading the status at the main window, for slow time issues..

i wish to transfer some data from the popup directly to the main window via JS (and close the popup right after).

the event is a VOIP new ine call opened by the local phone soft dialer with parameters, and the main window is a browser CRM that will need to show ining call status via JS on the same page, AJAX-like [only local].

p.s:

maybe there is a way to municate between browser to windows application?, so the 3rd party software will send data to it and the application will municate to the window (or Firefox extension - but i prefer without the need to install more addons)...

What approach should I take? what do you think is the solution?

I got two browser windows on the same domain,

one is the main window and the second is small popup window.

i found this: How to Communicate between two browser windows?

but, the problem is the popup opens as event on the local puter by 3rd party software... and i don't wish to municate back to the server, and reading the status at the main window, for slow time issues..

i wish to transfer some data from the popup directly to the main window via JS (and close the popup right after).

the event is a VOIP new ine call opened by the local phone soft dialer with parameters, and the main window is a browser CRM that will need to show ining call status via JS on the same page, AJAX-like [only local].

p.s:

maybe there is a way to municate between browser to windows application?, so the 3rd party software will send data to it and the application will municate to the window (or Firefox extension - but i prefer without the need to install more addons)...

What approach should I take? what do you think is the solution?

Share Improve this question edited Jan 26, 2024 at 1:36 Jonas 129k102 gold badges327 silver badges405 bronze badges asked Apr 23, 2013 at 12:09 itaiitai 3025 silver badges15 bronze badges 1
  • i think i will go with dailer->bridge application->addon[via socket]->js munication.... the dialer will execute a mand instead of popup, execute and send parameters to local application i'll write, that municate with firefox addon via socket to local host munication and calling alocal js with the parameters... plicated but fast and clean. – itai Commented Apr 23, 2013 at 13:06
Add a ment  | 

2 Answers 2

Reset to default 4

If the one browser does not open up the other browser, there is no way for the two browsers to talk through window.opener.

What you could try is storing data into localstorage and have the windows poll localstorage for changes.

Have you tried using window.opener to refer to the parent window?

发布评论

评论列表(0)

  1. 暂无评论