View Full Version : mouseover link to another frame
MessU
11-07-2002, 07:57 PM
i want to use a nav-frame on my site. with mouseover over the text the link should open in another frame on my site. but the site opens in the same frame!!!
I've used that line but don't know the expression to change the frame:
<a href="news.htm" onMouseover="window.location=this.href">news</a>
i know that i need to change the expression >window.location<
but don't know how!
please help!
beetle
11-07-2002, 08:41 PM
Dont' need javascript for this, just HTML
<a href="news.htm" target="frameName">news</a>
Where frameName is the name of the frame you want the links to appear in.
Note: if EVERY link in your navigation frame is supposed to target the same content frame, you can use the base HTMLelement instead. In the <head> of the navigation page..
<base target="frameName">
If any indivudual link needs to target something else, it's target attribute will override the target set by the base
MessU
11-07-2002, 09:18 PM
not working, I've tried that (now again) but it doesn't work. the link opens in the same frame, where the hyperlink is positioned.
It's like that:
2 frames:
-up
-down
4 sites:
-up
-down
-site1
-site2
in the up-frame there are the links to site1 and site2. i want them to function with the mouseover link. but site1 and site2 should open in the down-frame.
so it doesn't work with just targeting to the down-frame.
nevertheless, thx
---------------------------------------------------------------
<html>
<head>
<meta http-equiv="Content-Language" content="de-at">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>up</title>
<base target= "down">
</head>
<body>
<p>up</p>
<a href="site1.htm" target="down" onMouseover="window.location=this.href" >site 1</a>
<a href="site2.htm" target="down" onMouseover="window.location=this.href" >site 2</a>
</body>
</html>
--------------------------------------------------------------------------
beetle
11-07-2002, 09:27 PM
strange. got a link online? Or can I at least see the HTML for your frameset?
MessU
11-07-2002, 09:45 PM
i've uploaded a simple system to a bravenet account
http://messu.bravepages.com
It's the same system, and it's everything i need, if this is working!
beetle
11-07-2002, 10:04 PM
Ohhhh, I see what you are trying to do.
<a href="site1.htm" target="Unten" onMouseover="top.frames['Unten'].location=this.href" >site 1</a>
<a href="site2.htm" target="Unten" onMouseover="top.frames['Unten'].location=this.href" >site 2</a>
Do you really want these to occur onMouseOver?
MessU
11-07-2002, 10:13 PM
That's it!! Thx a lot!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.