Forcing frames into a frameset

wxdqz

New Member
Hi

I'm hoping someone can help me decipher some code I have to force frames into a frameset! I'm fairly new to JavaScript and would appreciate a description of how the different parts of this code work.

Code in the Frameset:
<script language="JavaScript" TYPE="TEXT/JAVASCRIPT">
var inframe = "TRUE";
function lframe(){
var loc = window.location;
loc = loc.toString();
loc = loc.toLowerCase();
if (loc.indexOf("?") > 0) {
var nPage = loc.substring((loc.indexOf("?") + 1), loc.length);
window.mainFrame.location=nPage;
} }
</script>

Code in individual frames:
<script language="JavaScript" TYPE="TEXT/JAVASCRIPT">
if (window.parent.inframe != "TRUE") {
window.parent.location = "index.html?welcome.html" ;
}
</script>

Thank you!
Nic
 
Back
Top