Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames 2

Status
Not open for further replies.

hedidit

Technical User
Jul 21, 2005
142
0
0
GB
Hi all,

I have a site in two frames, a small top frame with naviagtaion bar in it and the main content frame below.

My problem is that google is only picking up on the main frame content pages so when users try to visit my site they don't see the top frame that enables them to navigate the site.

Is there a way to redirect the visitor if they hit a page and aren't viewing it within my framset?

Cheers
 
Use server side includes, ASP, PHP, or some other server-side scripting to automatically include the navigation on each page so you can avoid this kind of thing.

If you insist on using frames, you can use Javascript to check to see if the page location.href is the same as the top.location.href, and switch to a framed page if it isn't. Of course, this won't work if someone has Javascript turned off.

Lee
 
Thanks for the responses... the site is mainly written in ASP so I can use a session variable to do this...

Thanks trollacious i can't believe I didn't think of that!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top