•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 374,021 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,736 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1644 | Replies: 2
![]() |
•
•
Join Date: Mar 2006
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
I'm a complete amateur at websites but our golf club delegated the job to me to build their website which I published about a year ago.
The problem is; the site is built in a frame (Left Hand Contents) so the left hand navigation bar remains visible. When found in Google, however, the link takes one to the "Home" page with the left hand frame missing. For the time being I have put a text link below the banner so people arriving via say a bookmark or Google can load the frame.
Is there a Javascript code I can insert in the pages so no matter which page is bookmarked it will load the frame?
I will be happy to e-mail the entire site to anyone if it helps solve this.
Thanks in advance.
Ed
The problem is; the site is built in a frame (Left Hand Contents) so the left hand navigation bar remains visible. When found in Google, however, the link takes one to the "Home" page with the left hand frame missing. For the time being I have put a text link below the banner so people arriving via say a bookmark or Google can load the frame.
Is there a Javascript code I can insert in the pages so no matter which page is bookmarked it will load the frame?
I will be happy to e-mail the entire site to anyone if it helps solve this.
Thanks in advance.
Ed
You can add a small script to the head portion of each of your child/inner pages. This script will check to see if it is inside a frame, and if not, redirect back to the home page.
This assumes that your main page is named "index.htm".
<script language="javascript" type="text/javascript">
if (top == self)
{
self.location.href = "index.htm";
}
</script>This assumes that your main page is named "index.htm".
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- Error Loading operating System (Windows NT / 2000 / XP / 2003)
- Frame detection possible? (HTML and CSS)
- Frameset,Showing loading..Please wait message (ASP.NET)
- Problems loading websites (Web Browsers)
- IE 6.0 freeze while loading (Web Browsers)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Expanding iFrame Help
- Next Thread: Dynamicallu Resizeing IFRAME based on content



Linear Mode