jQuery - Get URL of iframe AFTER redirection on same domain
16,849
The suggestion from sunn0 should work with this slight amendment.
$("#iframeid").load(function(){
alert(this.contentWindow.location);
});
Related videos on Youtube
Author by
Matthew H
Updated on May 03, 2022Comments
-
Matthew H almost 2 years
Using Jquery, how can I get the URL of an iframe after redirection has occurred to a URL in the same domain?
-
Pekka over 13 yearsWhat kind of redirection? Where is the jQuery instance running?
-
-
Fenton over 10 years@confiq are you loading a page on the same domain in the iframe? You can only inspect the location on the same domain.
-
confiq over 10 yearsYeah, I've figure out that I can't access
.location
property if it's not same domain/port.