Compare Current Iframe URL With Another URL

I am trying to make a simple website using an Iframe. I want to reach that result:
When Current Iframe URL Changes (User Navigates):
If Current URL=XXX
Redirect To YYY
Do Nothing

Can anyone help please?
Thanks a lot!

Welcome to SitePoint, @elakhalinc50. We love to help out, but we do not offer a free coding service. Perhaps you can post what code you have so far when you tried this for yourself, and explain where you got stuck.

1 Like

Actually, I am trying to find some ideas of how i can do it! I code Java & HTML and CSS and planning to learn JavaScript too, thats why i need some help here!
I would really appreciate if you help me with that please?

What you will be able to do will depend a lot on CORS restrictions. Are you the owner of the pages that are inside the iframe?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.