Okay.
I have a page of frames. The 'topguh' frame is a title page changes along with the 'main' frame when a button is clicked on the 'menu' frame. The problem is that sometimes the 'menu' frame doesn't match the 'main' frame and vice versa. So what I did is put in onLoad code that checks for the proper frame, and also makes sure that the page is actually in a frame to begin with. If the page is not in a frame, then init_webs.html is loaded. Now that I've 'fixed' the problem of topguh/main matching, I now have an eternal loop that constantly reloads the 'main' page. Here's the code (indented for easy reading):
in top_sitemap.html
in sitemap.html
sitemap.html (v2)
I'm pretty sure the problem is with the code in the top_sitemap.html, but I can't figure it out, and I'm even getting a little confused.
I have a page of frames. The 'topguh' frame is a title page changes along with the 'main' frame when a button is clicked on the 'menu' frame. The problem is that sometimes the 'menu' frame doesn't match the 'main' frame and vice versa. So what I did is put in onLoad code that checks for the proper frame, and also makes sure that the page is actually in a frame to begin with. If the page is not in a frame, then init_webs.html is loaded. Now that I've 'fixed' the problem of topguh/main matching, I now have an eternal loop that constantly reloads the 'main' page. Here's the code (indented for easy reading):
in top_sitemap.html
Code:
onLoad="
if (parent.main.location != 'sitemap.html')
parent.main.location='sitemap.html'
"
in sitemap.html
Code:
onLoad="
if ((top == null) || (top == self)) {
top.location='init_webs.html'
}
else
parent.topguh.location='top_sitemap.html'
};"
sitemap.html (v2)
Code:
onLoad="
if ((top == null) || (top == self)) {
top.location='init_sitemap.html'
}
else { if (parent.topguh.location != 'top_sitemap.html')
parent.topguh.location='top_sitemap.html'
};"