Umair Aslam
Umair Aslam

Reputation: 21

How to catch redirected URL in iframe?

We are loading a form using iframe, after submit form we are redirected to new URL(a web page). Actually we want to get/catch that redirected url in our JavaScript code. we had searched a lot but did not find any solution that meet our requirement. help me to find solution. Thanks in Advance.

Upvotes: 0

Views: 297

Answers (1)

Quentin
Quentin

Reputation: 943207

For security reasons, you can't use an iframe to monitor what a user does or where they navigate to on a third party site.

If you had control over the site in the iframe, then you could use postMessage to signal the parent document with the information you wanted.

Upvotes: 1

Related Questions