Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  8] [ 1]  / answers: 1 / hits: 29467  / 12 Years ago, thu, june 7, 2012, 12:00:00

I know on the same page frame or parent I can make either go to something via window.location however is there a means of checking to see if I am in the iframe and if so make the top (parent window) location go somewhere?


More From » jquery

 Answers
5

This is a simple code to check if your page is loaded in iframe:



if (window.location != window.parent.location)
window.parent.location = http://someurl;

[#85069] Thursday, June 7, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
loganl

Total Points: 424
Total Questions: 86
Total Answers: 112

Location: Zimbabwe
Member since Thu, Jul 21, 2022
2 Years ago
;