danielcmartin
05-01-2003, 10:20 PM
I have tried to use frames for navigation on my site. I built the pages and opened to frameset document. I clicked a link in my left frame with a target tag telling it to open in the main section. The link opened in a new window instead of the main frame. Why is this, and can you tell me how to fix it?
THE LEFT FRAME
<html>
<head><title>MENU</title>MENU</head>
<style type=text/css>
</style>
<body><p>
<a href="http://www.habbohotel.com" target="main">HABBO HOTEL</a><p>
<a href="http://www.hotmail.com" target="main">HOTMAIL</a><p>
</body></html>
NOTE: The frames have different names to those you reccomend on your site because I used a book when creating my page, the frame target name is correct however, I have checked it twice!)
THANKS, danielmartin
Lemon Squash
05-01-2003, 11:27 PM
Are you sure the frame you want it to appear in is called "main" ?
Xiphias
05-02-2003, 12:07 AM
try this, if you're sure your frame's name is "main":
<html>
<head><title>MENU</title></head>
<body>
<p><a href="http://www.habbohotel.com" target="main">HABBO HOTEL</a><br /><br />
<a href="http://www.hotmail.com" target="main">HOTMAIL</a></p>
</body></html>
amicus
05-02-2003, 12:18 AM
the 'http://www.hotmail.com' one won't work 'cos hotmail.com is doing a 'top' on they're site. as for the 'http://www.habbohotel.com' i created a little test frame page. i use the name 'main' as the frame name and it seems to be working.
i'd triple check that one. i don't think you're doing anything wrong on this one. it's just how the other sites are setup.
danielcmartin
05-02-2003, 05:50 PM
Ok folks, thanks to everyone who replied, I tried everything you sugested but it still opens in a new window. I have also tried using different sites. Perhaps it is a problem somewhere else?
I will send the html from all the pages.
LEFT FRAME - NAVIGATION (menu.htm)
<html>
<head><title>MENU</title></head>
<body><p>
<a href="http://www.habbohotel.com" target="main">HABBO HOTEL</a><p>
<a href="http://www.hotmail.com" target="main">HOTMAIL</a></p>
</body></html>
MAIN FRAME - CONTENT (main.htm)
<html></html>
FRAMESET (default.htm)
<html>
<head><title>Dan's Menu</title></head>
<style type=text/css>
</style>
<frameset cols="20%,*">
<frame src="menu.htm" name="left">
<frame src="main.htm" mame="main">
</frameset>
</html>
It's probably something really stupid!!! Plz help!!!!
amicus
05-02-2003, 06:00 PM
you have a typo my friend. you used 'mame' instead of 'name'. i do that all the time :)
danielcmartin
05-02-2003, 06:09 PM
*HITS HEAD ON WALL* *HITS HEAD ON WALL HARDER*
I am sooooo dumb, thanks for pointing it out!