Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
45
rated 0 times [  51] [ 6]  / answers: 1 / hits: 15710  / 14 Years ago, sat, may 8, 2010, 12:00:00

Is it possible to get the referrer of an iFrame's parent page with JavaScript in iFrame?



Example: Page A has an iFrame. The iFrames referrer is be page A. But is is possible to get Page A's referrer in the iFrame with JavaScript?


More From » iframe

 Answers
15

This should be:



parent.document.referrer


Anything in the window that creates the iframe should be accessible through the parent scope.


[#96844] Wednesday, May 5, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
laytonlamontm

Total Points: 745
Total Questions: 130
Total Answers: 130

Location: Cambodia
Member since Thu, Oct 7, 2021
3 Years ago
;