Link to home
Start Free TrialLog in
Avatar of ppmb
ppmb

asked on

Frame links to other URL

I have a 2 frame sets page. On the left hand side is my menu and the right hand side I want to display my friend's page, which is not the same domain and address. How do I do that??
ASKER CERTIFIED SOLUTION
Avatar of ManoloMA
ManoloMA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ManoloMA
ManoloMA

If you want to do it with a function:

<SCRIPT >
fucntion go(){
  top.frames['rightframename'].location = "http://yourfriendpage"
}
</SCRIPT>

<TABLE>
 <TR><TD onclick="go()">Visit the page of my friend</TD></TR>
</TABLE>

It is not necesary to put the 'onclick' in a td TAG.
Keep in mind that you need to name your frames in the frames page html.

I.E..
<html>
<head>.....
<frameset framespacing="0" border="0" frameborder="0" cols="158,*">
    <frame name="menu" src="nav.htm" scrolling="auto" target="Main">
    <frame name="Main" src="main.htm" scrolling="auto">
  </frameset>

Also notice the added security of targetting the Main frame in this html as well.
basically the source would be like this:

index.html:

<frameset rows="15%,*">
<frame src="index2.html" name="window1">
<frame src="menu.html" name="menu">


index2.html...

<whatever you want in here>


menu.html

<a href="http://friend.com" target="window1">my friend's page</a>
ncr, did you generate that code you posted?  First of all, that is exactly what Manolo and I suggested, (are you hard up for points?), and second of all, your code puts his his friends page, or all his site pages, in a window that is only 15% of the screen, (and a row?).  

Think first, and look at previous comments.  This cheap shot of point grabbing is a joke.
Avatar of ppmb

ASKER

I will try all the code and take the best code.
oops I did that size the wrong way around sorry!!
oops I did that size the wrong way around sorry!!

and yes I am hard of points because I'm STUPID!!!

Avatar of ppmb

ASKER

TO nfcdrummer :
Your answer worked but I can't take your answer since the comment suggested by ManoloMA also worked. I have to give credit to ManoloMA since ManoloMA provided the comment earlier than you did. Sorry, nfcdrummer.