views:

37

answers:

2

Hi,

I start a popup with window.open("link","name"). I don't have control on the popup.

The popup it's then redirecting to another link.

How can I get the final link of the popup ? The final link it's on another domain.

with popup_window_object.location.href I can set the link but I can't get it.

Thank you.

+1  A: 

You can't read a location from another domain because of security restrictions. If the first content in the popup is your page, you can push a next popup's location into a variable of a parent window.

Mikhail Nasyrov
"I don't have control on the popup" sounds like it's not his page.
bzlm
+1  A: 

The same-origin policy makes this impossible for privacy reasons. It would work if the final URL had the same hostname and port number as the page trying to get it, but since this is not the case, the code generates a security error.

idealmachine