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 8928309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:24:33+00:00 2026-06-15T08:24:33+00:00

The browser has two tabs opened with the different URL. The data received by

  • 0

The browser has two tabs opened with the different URL.

The data received by one html page from server…

Is it possible to display the same data in another tab which is already opened without reloading…If so how should that has to be done…

  • 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-15T08:24:34+00:00Added an answer on June 15, 2026 at 8:24 am

    Yes, if either:

    1. Your code opened the other tab (via window.open), or

    2. The window has a name (such as one assigned via the target attribute on a link, e.g. target="otherwindow")

    Additionally, the window’s content must be on the same origin as the document you’re interacting with it from, or you’ll be blocked by the Same Origin Policy.

    1. If you’re opening it via window.open

    window.open returns a reference to the window object for the window that was opened, which (assuming it’s on the same origin) you can do things with. E.g.:

    var wnd = window.open("/some/url");
    
    // ...later, when it's loaded...
    
    var div = wnd.document.createElement('div');
    div.innerHTML = "content";
    wnd.document.appendChild(div);
    

    You can use all of the usual DOM methods. If you load a library in the other window, you can use that as well. (It’s important to understand that the two windows have two different global namespaces, they’re not shared.)

    Here’s a full example. I used jQuery in the below just for convenience, but jQuery is not required for this. As I said above, you can use the DOM directly (or another library if you like):

    Live Copy | Live Source

    HTML:

    <button id="btnOpen">Open Window</button>
    <button id="btnAdd">Add Content</button>
    <button id="btnRemove">Remove Content</button>
    

    JavaScript:

    (function($) {
      var btnOpen,
          btnAdd,
          btnRemove,
          wnd,
          wndTimeout,
          wnd$,
          newContentId = 0;
    
      btnOpen   = $("#btnOpen");
      btnAdd    = $("#btnAdd");
      btnRemove = $("#btnRemove");
      updateButtons();
    
      btnOpen.click(openWindow);
      btnAdd.click(addContent);
      btnRemove.click(removeContent);
    
      function updateButtons() {
        btnOpen[0].disabled = !!wnd;
        btnAdd[0].disabled = !wnd$;
        btnRemove[0].disabled = !wnd$;
      }
    
      function openWindow() {
        if (!wnd) {
          display("Opening window");
          wnd$ = undefined;
          wndTimeout = new Date().getTime() + 10000;
          wnd = window.open("/etogel/1");
          updateButtons();
          checkReady();
        }
      }
    
      function windowClosed() {
        display("Other window was closed");
        wnd = undefined;
        wnd$ = undefined;
        updateButtons();
      }
    
      function checkReady() {
        if (wnd && wnd.jQuery) {
          wnd$ = wnd.jQuery;
          wnd$(wnd).on("unload", windowClosed);
          updateButtons();
        }
        else {
          if (new Date().getTime() > wndTimeout) {
            display("Timed out waiting for other window to be ready");
            wnd = undefined;
          }
          else {
            setTimeout(checkReady, 10);
          }
        }
      }
    
      function addContent() {
        var div;
    
        if (wnd$) {
          ++newContentId;
          display("Adding content '" + newContentId + "'");
          wnd$("<div>").addClass("ourcontent").html("Added content block #" + newContentId).appendTo(wnd.document.body);
        }
      }
    
      function removeContent() {
        var div;
    
        if (wnd$) {
          div = wnd$("div.ourcontent").first();
          if (div[0]) {
            display("Removing div '" + div.html() + "' from other window");
            div.remove();
          }
          else {
            display("None of our content divs found in other window, not removing anything");
          }
        }
      }
    
      function display(msg) {
        $("<p>").html(String(msg)).appendTo(document.body);
      }
    
    })(jQuery);
    

    2. If you’re opening it via a link with target

    window.open can find and return a reference to that window:

    var wnd = window.open("", "otherwindow");
    

    Note that the URL argument is empty, but we pass it the name from the target attribute. The window must already be open for this to work (otherwise it will open a completely blank window).

    Here’s the above example, modified to assume you’ve opened the window via <a href="..." target="otherwindow">...</a>:

    Live Copy | Live Source

    HTML:

    <a href="/etogel/1" target="otherwindow">Click to open the other window</a>
    <br><button id="btnGet">Get Window</button>
    <button id="btnAdd">Add Content</button>
    <button id="btnRemove">Remove Content</button>
    

    JavaScript:

    (function($) {
      var btnGet,
          btnAdd,
          btnRemove,
          wnd,
          wndTimeout,
          wnd$,
          newContentId = 0;
    
      btnGet    = $("#btnGet");
      btnAdd    = $("#btnAdd");
      btnRemove = $("#btnRemove");
      updateButtons();
    
      btnGet.click(getWindow);
      btnAdd.click(addContent);
      btnRemove.click(removeContent);
    
      function updateButtons() {
        btnGet[0].disabled = !!wnd;
        btnAdd[0].disabled = !wnd$;
        btnRemove[0].disabled = !wnd$;
      }
    
      function getWindow() {
        if (!wnd) {
          display("Getting 'otherwindow' window");
          wnd$ = undefined;
          wndTimeout = new Date().getTime() + 10000;
          wnd = window.open("", "otherwindow");
          updateButtons();
          checkReady();
        }
      }
    
      function windowClosed() {
        display("Other window was closed");
        wnd = undefined;
        wnd$ = undefined;
        updateButtons();
      }
    
      function checkReady() {
        if (wnd && wnd.jQuery) {
          wnd$ = wnd.jQuery;
          wnd$(wnd).on("unload", windowClosed);
          updateButtons();
        }
        else {
          if (new Date().getTime() > wndTimeout) {
            display("Timed out looking for other window");
            wnd = undefined;
            updateButtons();
          }
          else {
            setTimeout(checkReady, 10);
          }
        }
      }
    
      function addContent() {
        var div;
    
        if (wnd$) {
          ++newContentId;
          display("Adding content '" + newContentId + "'");
          wnd$("<div>").addClass("ourcontent").html("Added content block #" + newContentId).appendTo(wnd.document.body);
        }
      }
    
      function removeContent() {
        var div;
    
        if (wnd$) {
          div = wnd$("div.ourcontent").first();
          if (div[0]) {
            display("Removing div '" + div.html() + "' from other window");
            div.remove();
          }
          else {
            display("None of our content divs found in other window, not removing anything");
          }
        }
      }
    
      function display(msg) {
        $("<p>").html(String(msg)).appendTo(document.body);
      }
    
    })(jQuery);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I try to load two of the same page from my server in
I think every browser has user-controllered full-page zoom nowadays. Is it in anyway accessible
Is it possible to apply a CSS(3) effect when the browser has scrolled? I
I'm working on a server in a distributed application that has browser clients and
My question is not like this one: Browser-independent way to detect when image has
Say, a parent div has two child divs, one containing text, the other containing
I have an ASP.Net application running under IIS 6. A simple page has two
I'm trying to design a page that has two columns of content, div#left and
I have a url which has two parameters and I have rewritten them in
I have a page that has two parts that are slower loading. As they

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.