link in iframe to navigate parent page code example
Example: iframe parent url
var url = (window.location != window.parent.location)
? document.referrer
: document.location.href;
var url = (window.location != window.parent.location)
? document.referrer
: document.location.href;