This jQuery will return the source URL of a frame:
$('#frame-name').attr('src')
But if a link inside the frame is clicked, the original source is still returned.
Is it possible to detect the new source URL? Or get the source of the new document loaded in the frame? If either of those is a yes, are there security constraints if the source frame contains an URL from a different domain?
parent.frames[1].location.href;
Not jQuery, but what I was looking for. However, kicks a security error if the source is on a different domain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With