Catch title from a popup

Asked

Viewed 96 times

2

I need to get the title or URL of a popup.

Inside my system has a button, when clicking opens this popup with an external website

For example:

window.open("http://baixaki.com.br/", options);

How do I get the title of this popup?

1 answer

3

Cannot take data from an external link pop-up because of Same-origin policy.

Just out of curiosity, if the pop-up was an internal link, you could do so:

/* ... */
  var win = window.open('link.html');
  win.addEventListener('load', function() {
    console.log(win.document.title);
  });
/* ... */
  • but there is another way to do that ? I put this site to open with Curl etc ? because the problem is that this external site it opens with a url and after 3 seconds redirects to another url, and it’s this other url that I need to pick up, I know there’s how to do pq I’ve seen other sites that do this, anyway, is there any way to get the title or the url after the redirect ?

  • shows me a site that has this that you’re talking about, that if there is how, I sure can do it... but you can be sure that it is impossible to catch the title of a document inside a popup when this document is not from the same domain of who opened the pop-up.

  • have you spend your face or skype please ? pq is a lot to talk about, and we will spend a lot of time exchanging messages here :/ please!

Browser other questions tagged

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