User Name Password Register
DaniWeb IT Discussion Community
All
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,612 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,442 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: 1647 | Replies: 2
Reply
Join Date: Mar 2006
Posts: 2
Reputation: Edwardobrien is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Edwardobrien Edwardobrien is offline Offline
Newbie Poster

Help Loading Frame

  #1  
Mar 23rd, 2006
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,589
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 34
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Loading Frame

  #2  
Mar 23rd, 2006
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.

<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".
Reply With Quote  
Join Date: Mar 2006
Posts: 2
Reputation: Edwardobrien is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Edwardobrien Edwardobrien is offline Offline
Newbie Poster

Re: Loading Frame

  #3  
Mar 23rd, 2006
Many thanks for your input. I took a chance and used another forum also and got a very comprehensive response. It is a code that loads the frame at whichever page one bookmarks.

Again, thanks for your help. It's good to know it's available.

Best wishes,

Ed
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 8:39 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC