...

View Full Version : function to detect if a page is iframed?



wouter
01-15-2003, 05:06 PM
Is there a function to detect if a page is iframed?

ex.

<div align="center">
<IFRAME name="iframe_name" id="iframe_id" src="test.htm" scrolling="no" width="550" height="410" frameborder="0">
</IFRAME>
</div>

How to check inside 'test.htm' if test.htm is placed in an iFrame?

Tx

beetle
01-15-2003, 06:38 PM
function inFrames()
{
return ( top != self );
}

wouter
01-15-2003, 09:03 PM
Thank you -- so simple but high effective



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum