Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8454209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:57:53+00:00 2026-06-10T11:57:53+00:00

I have an webapplication which is running in two different browser windows/tabs at the

  • 0

I have an webapplication which is running in two different browser windows/tabs at the same time (lets call them a and b).
The problem is that I need to react on clicks in tab a with content updates in window b, the changes need to be immediatly.

Any suggestions are welcome. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:57:55+00:00Added an answer on June 10, 2026 at 11:57 am

    A direct communication between browser tabs/windows only works, if one of the windows has been opened by the other one using window.open. If this is the case in your application, you can do something like the following (instant bidirectional communication). This is only a very basic example, but I’m sure you can expand it to fit your needs.

    window A:

    var windowB = window.open("windowB.html");   //reference to window B
    windowB.onload = function(){
        windowB.triggerChange();
    };
    
    function changeOK(str) {
        console.log("windowA: "+str);
    }
    

    window B:

    var windowA = window.opener;   //reference to window A
    
    function triggerChange() {
        console.log("windowB: triggerChange");
        windowA.changeOK("change done");
    }
    

    Don’t forget to disable your pop-up blocker before trying this out. 😉

    If window A and window B are opened independently though, you can’t use direct communication like this. You then have basically two options to accomplish what you want (described here on SO):

    1. Use cookies: Set a cookie in window A to pass data and read the cookie regularly using setTimeout in window B to react on changes. See this example.

    2. Communicate with a server using AJAX with long polling (Comet technique).

    As both solutions use indirect communication, they obviously can’t trigger instant changes in window B. So you will have to wait at least several milliseconds until B’s content can be updated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application which passes long-running requests to a Windows Service on
We have two applications running on single machine,one of which is web application that
We have one existing web application which was running in IE browser. But because
I have written a simple web Application which is running(on Tomcat Server) fine on
I have an MVC3 webapplication which runs as a DOMAIN\USER1 account. This user has
I'm developing an ASP.NET forms webapplication using C#. I have a method which creates
I have a web application which process the data collected from different client machines
I have one web application which I have been working for some time.I am
I have a web application in which two of the major components are the
I have a two factor based authentication server which i need to integrate to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.