Link to edit another window open

Asked

Viewed 121 times

1

Next, I have a page that, by clicking on a button, opens a new window. On this new page I would like to put links that affect the page that generated this window.

Someone knows how to do?

  • i have window A, which when clicking the button, generates a report in a new window. the links of this report (new window) should affect window A.

  • Knows how to use class window javascript?

  • never used. have some examples

3 answers

1

If the tab is on the same domain you can access the parent page that opened through the window.opener. If it’s different domains, it will prohibit you from accessing document in most browsers.

function alteraPaginaPai() {
    window.opener.document.getElementById('lbl').innerHTML = "Alteração!!"
}

0

-1

In the target option you have the options: _Blank _Parent _self _top framename

<a href="http://www.google.com" target="_parent">Visit google.com!</a> 

and the one you want is Parent. hope I helped. cumpz

  • that’s not quite what I wanted. I have window A, which when clicking the button, it generates a report in a new window. links from that report (new window) should affect window A.

  • I don’t think that can be done. what Voce can do is always use the same page. window A opens link -> window B. in window B opens link to window A... I’m not seeing another way. I hope I helped. may someone know another way! ;)

  • @LPSANTOS he is quoting javascript as one of tags of the question, therefore it is necessary to evaluate the possibility within this language also. In javascript I can control iframes and pop-ups using the class window. I already asked if he knows how to use, if he responds negatively I will show him some examples of how to use windows with this class.

  • 1

    ola @Erlon Charles, you’re right, I didn’t even notice the javascript tag, so maybe it’s possible! , I don’t work much with Java. but thanks for the tip!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.