Load page in frame

liunx

Guest
Hello people,<br />
<br />
I got a problem and maybe you can help me!!<br />
I have a page with a frameset.<br />
Now when someone clicks on a link in a search engine to my site it opens the link without the frameset.<br />
But then the people don't see the navigaton anymore.<br />
Is there a way that the link can be forced to open in the frameset by putting some script to it.<br />
<br />
Greetings Cybercool<!--content-->quite easy, add target="frame-name" to the links<br />
where frame-name is the name of the frame you want the page to open in :)<!--content-->Leo, how can you change googles search :)<br />
<br />
he is talking about making the frame open in the framed index page if somebody clicks on it in the search.<br />
<br />
this can only be donwe with javascript. try searching the client side forum for answers.<!--content-->Well, it CAN be done, but it's not quite as easy as you might want. You can add code like this to the file:<br />
<br />
<script type="text/javascript" language="javascript"><br />
function index_go()<br />
{<br />
if (top.location == location)<br />
{ <br />
top.location.href = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/">http://www.htmlforums.com/archive/index.php/</a><!-- m -->"http://www.whatever.com/framesetpage.html";<br />
} <br />
}<br />
</script><br />
<br />
<br />
And add onload="index_go()" to the body tag.<br />
<br />
The problem is, that will put them to the frameset page, and the frameset page will load it's default pages. For example, if they were trying to go to your contact page, but your frameset automatically loaded an about page, they would get forwarded from the contact page (what they wanted) to the about page, BUT they would have navigation.<br />
<br />
The only way that I know of to fix that, is to convert your site to php, and pass parameters through the url. no small task I found, but that's how I did it here:<br />
<!-- m --><a class="postlink" href="http://www.dikaios.net/aaron.php">http://www.dikaios.net/aaron.php</a><!-- m --><br />
forwards you to:<br />
<!-- m --><a class="postlink" href="http://www.dikaios.net/players.php?iframe=aaron">http://www.dikaios.net/players.php?iframe=aaron</a><!-- m --><!--content-->Originally posted by scoutt <br />
Leo, how can you change googles search :)<br />
<br />
he is talking about making the frame open in the framed index page if somebody clicks on it in the search.<br />
<br />
<br />
<br />
dooohhhh,what a jackass, that's what you get for glancing at something and not reading it properly, all i registered was 'frame link open in' :P <br />
<br />
Sorry CyberC :rolleyes: <br />
<br />
i've used (a long time ago) a variation of jaeman's javascript:<br />
<br />
<SCRIPT LANGUAGE="JavaScript"> <br />
<!-- Begin <br />
if (window == top) top.location.href = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/">http://www.htmlforums.com/archive/index.php/</a><!-- m -->"index.html"; <br />
// End --> <br />
</script><!--content-->
 
Back
Top