Here is the solution :
I found it in Beginning Javascript (Wrox).
-------------
| test.html |
-------------
Code:
<html>
<head>
<script type="text\javascript">
function onLoad()
{
if(window.top != window)
{
alert("Opened in frame.");
}
}
</script>
</head>
<body onload="onLoad();">
</body>
</html>
--------------
| test1.html |
--------------
Code:
<html>
<head>
</head>
<body>
<iframe src="test.html" />
</body>
</html>
Create files test.html and test1.html and put them in the same folder.
Now try to open both of them individually.
Hope your problem will be solved.