Wildcat
09-29-2003, 02:16 PM
I'm trying to write a simple framebreaker script for the splash page of my site, and I'm wondering how I can get it to open in the current window for the user. My script does open the page without frames, but in another window.
<script language="JavaScript"><!--
function breakOut() {
if (window.parent != window.document) {
thisPage = window.open('index.html')
}
else { }
}
--></script>
</head>
<body onLoad="breakOut()">
I will appreciate your help, and if anyone can tell me how to do this without using an if statement, because it seems rather clumsy.
<script language="JavaScript"><!--
function breakOut() {
if (window.parent != window.document) {
thisPage = window.open('index.html')
}
else { }
}
--></script>
</head>
<body onLoad="breakOut()">
I will appreciate your help, and if anyone can tell me how to do this without using an if statement, because it seems rather clumsy.