How would I check if the page is being loaded in an iframe? Also, could I make a page change the main URL to its own from within an iframe?
A:
Both are possible and explained extensively in this post:
Coding Horror - We Done Been...Framed!
Keep in mind that these are not perfect solutions since the parent page can prevent you from doing these things using various methods (also discussed in the post).
Justin Niessner
2010-06-22 17:09:52
A:
To get the parent's tag/nodeName :
theParent = $(this).parent();
//alert(theParent[0].nodeName);
Babiker
2010-06-22 17:22:09