How to redirect URL on refresh in Angular?

How do you auto redirect a webpage with an Iframe?

  • How do I get a webpage to automatically redirect to another webpage? The catch is, the page I want redirected is inside of an iframe, but I want it to load into the main browser window. As of now I have been able to successfully redirect but only within the iframe. I've tried target=_"top" and target=_"new" but nothing works. I'm I writing the code wrong? Here's the code I've been using: <meta http-equiv="Refresh" content="1; url=http://www.yahoo.com" target="_top"> Need help!

  • Answer:

    Using JavaScript... If you want to change the page in the iframe document.getElementById('iframe_id').s… = "some_location.php" If you want to change the content of the main page to be the same as the content in your iframe window.location = document.getElementById('iframe_id').src I hope this answers your question, if not let me know.

Dok at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

try not using a target EDIT: if you want it in the same window use target = "_self"

the man the myth the answerer

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.