Redirect from LTI iFrame
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to redirect out of the LTI iFrame to the Canvas homepage. When the user presses the cancel button, the event sends the user to the canvas homepage but it is within the LTI iFrame. Does anybody know how to get out of the iFrame using javascript or C#?
Thank you,
Shawn
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In HTML you can add the property target="_parent" to your <a> tags and it will open a link from an iFrame in the parent window of the iFrame. So it would look like
<a href="http://google.com" target="_parent">Click here.</a>
OR
In JavaScript:
window.parent.location.href= "http://www.google.com";
Read more at these links:
-html - how to force link from iframe to be opened in the parent window - Stack Overflow
-HTML link target Attribute