id-chalmers
11 years agoMentor
using freemarker to get window.top
Is there a method in the freemarker context object (or other object) that is roughly equivelant to javascript's window.top? I'd like to detect whether my page is being loaded from within an iframe. The javascript way to do it is :
if (window.self != window.top ){
//page is embedded in iframe
}else{
//not in iframe
}