Archive for 'Javascript'
Check if page is loaded in IFrame
Posted on 30. Nov, 2009 by Nikhil Sheth.
1
I was working on a page and wanted to make sure that this page is not opened in an iframe. Here is some piece of javascript code which helps you to detect this. var inFrame= (window.location != window.parent.location) ? true : false; If inFrame is true you can redirect user or throw some alert. Share/Save
