Page 1 of 1
Script for Framed Sites?
Posted: Sat Jul 12, 2003 2:17 pm
by fac51
If i do a search on google and see a page of my site when i click on the link it takes it to that page but without the frames (as this is main page only) therefore vistors cannot see the index on the left and therefore cannot navigate back to the main page!

Posted: Mon Jul 14, 2003 7:42 pm
by Adamizer
Then make a button for the frame in the forum. Ive been meaning to ask u for one but forgot it every time I was done looking there....
Posted: Mon Jul 14, 2003 10:07 pm
by arsehole
you could use a javascript tht redirects the visitor to the frameset page if its not in a frame...
paste this script in the head of each individual page
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (window == top) top.location.href = "index.htm";
// End -->
</script>
Posted: Tue Jul 15, 2003 7:34 am
by fac51
ahh rite

does it only redirect if a visitor hits a link to an unframed page ie. on google but wont act if they go to the same link from the frame page?
Posted: Tue Jul 15, 2003 9:36 pm
by arsehole
exactly
its a simple if statement tht checks if the url of the page is the same as the url on the address bar...
if it is, it'll then redirect the user to the main frame page (make sure u dont put the script there

)
you could search around for a more specific script tht redirects the user to the main frame page with the page he wants in the frame
Posted: Tue Jul 15, 2003 9:53 pm
by fac51
cheers m8.. i'll give it a whirl :0
Posted: Fri Jul 18, 2003 4:13 pm
by fac51
thanks ive added the script to all pages and it works a treat
