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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use target in Frameset?

Status
Not open for further replies.

longmatch

Programmer
Nov 1, 2001
406
I just start to design a website using frameset with 3 frames, named title, menu, and main. I have hot link in menu frame. I would like to display my new page in main frame when I double click the link in the menu. I used target to do that. It always give me a new window, could not present the new page in main frame. WHY?

Please see the code.

Haijun

<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<TITLE></TITLE>
</HEAD>


<FRAMESET ROWS= &quot;20%, *&quot; BORDER=4>
<Frame NAME=&quot;Title&quot; SRC = &quot;title.html&quot; SCROLLING=no>
<frameset COLS=&quot;20%, *&quot; BORDER=10>
<frame NAME=&quot;Menu&quot; SRC=&quot;Menu.htm&quot; SCROLLING = no>
<frame NAME=&quot;Main&quot; SRC=&quot;MainPage.html&quot;>
</frameset>
</FRAMESET>
</HTML>


<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<TITLE></TITLE>
</HEAD>
<Body>
<TABLE WIDTH=75% BORDER=0 CELLSPACING=1 CELLPADDING=1>
<TR>
<TD><B><A HREF = &quot;RegisterPage.asp&quot; TARGET= &quot;Main&quot;>NEW USER</A></B></TD>
</TR>
<TR>
<TD><B><A HREF = &quot;LoginPage.asp&quot;>LOG IN</A></B></TD>
</TR>
<TR>
<TD><B><A HREF = &quot;Logout.asp&quot;>LOG OUT</A></B></TD>
</TR>
<TR>
<TD></TD>
</TR>
</TABLE>


</BODY>
</HTML>
 
Worked ok for me. I am assuming that was the actual code. It is important to use the same case in the target. For example if frame name is &quot;MAIN&quot;, a target of &quot;Main&quot; would not work.

HTH,
Clive
 
I fixed your code up a bit. You had some extra spaces, and you didn't have quotations for some things. I tried this out and it seems to work for me:

<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<TITLE></TITLE>
</HEAD>
<FRAMESET ROWS=&quot;20%,*&quot; BORDER=&quot;4&quot; BORDERCOLOR=&quot;BLACK&quot;>
<FRAME NAME=&quot;Title&quot; SRC=&quot;title.html&quot; SCROLLING=&quot;NO&quot;>
<FRAMESET COLS=&quot;20%,*&quot; BORDER=&quot;10&quot;>
<FRAME NAME=&quot;Menu&quot; SRC=&quot;Menu.html&quot; SCROLLING=&quot;NO&quot;>
<FRAME NAME=&quot;Main&quot; SRC=&quot;MainPage.html&quot;>
</FRAMESET>
</FRAMESET>
</HTML>

<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<TITLE></TITLE>
</HEAD>
<BODY>
<TABLE WIDTH=&quot;75%&quot; BORDER=&quot;0&quot; CELLSPACING=&quot;1&quot; CELLPADDING=&quot;1&quot;>
<TR>
<TD><A HREF=&quot;RegisterPage.asp&quot; TARGET=&quot;Main&quot;><B>NEW USER</B></A></TD>
</TR>
<TR>
<TD><A HREF=&quot;LoginPage.asp&quot;><B>LOG IN</B></A></TD>
</TR>
<TR>
<TD><A HREF=&quot;Logout.asp&quot;><B>LOG OUT</B></A></TD>
</TR>
<TR>
<TD></TD>
</TR>
</TABLE>
</BODY>
</HTML>

Hope this helps!!!
[deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
This problem is solved with your help. I appreciate your help.

Haijun
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top