View Full Version : frames issue: targeting right frame (which is inside bottom frame)?
supanamu
08-28-2002, 08:47 PM
i have my frames set up as so:
top/bottom frame
top frame includes java menu
bottom frame includes left/right frames
where the right frame is the main page
and the left frame holds more navigation
http://www.mistahfab.com/frames.html
i want to target the links to the right frame (which is
inside the bottom frame).
my java instructions said to put certain code in the
target frame (which i did) and yet the links still end
up displaying in the top frame...any ideas?
any help would be GREATLY appreciated...i've been
struggling with this for days now.
namu@originalhoneys.com
beetle
08-28-2002, 09:03 PM
Well, I don't know about all the java mess, but to properly reference the 'main' frame from ANY page, ANY frame - use this:top.frames['bottom'].window.frames['main'].window.location.hrefThis is an absolute reference, and will always work. Any other reference would be relative, and dependant on it's location
supanamu
08-28-2002, 09:12 PM
you seem to be one of the most helpful
members of this forum. i've read lots of
responses by you, trying to find answers,
lol.
ok, i hate to be a novice, but i am, so
i have to ask where this code would go?
do i place it in the variable.js or the
conf.js? or in the html of one of the frames?
beetle
08-28-2002, 09:24 PM
Uh, that would depend on how you need to use it. I'm looking at your page and the code and am beginning to realize your problem. In a nutshell, that menu system you are using isn't suitable for use in a frames page (most 'dropdown' menu systems aren't) I hate to say this (especially after the nice comment you gave) but I don't have the time to devote to a solution for this.
Best of luck
supanamu
08-28-2002, 09:43 PM
Thats more than understandable! If you took
serious time to help with involved problems,
you would spend 90% of your free time
answering posts and fixing other people's
messes!
:)
I appreciate your feedback regardless. Thanks
Beetle!
One last try though...would you recommend that
I use roll-over images and/or an image map
to replace that menu? Or are there any other
types of DHTML or java menus that are similar,
but will work across frames?
(And this is for the gallery...anyone, feel free
to answer!)
:)
Peaaaaaaaace
beetle
08-28-2002, 10:12 PM
Something like this may offer a simple solution<html>
<head>
<title>test</title>
<style>
div.item {
cursor: hand;
}
div.subMenu {
display: none;
}
</style>
<script>
function toggleDisp(node) {
node.style.display = (node.currentStyle.display == 'none') ? 'block' : 'none';
}
function doLink(nUrl) {
top.frames['bottom'].window.frames['main'].window.location.href = nUrl;
}
</script>
</head>
<body>
<table>
<tr>
<td valign="top">
<div class="menu">
<div class="item" onClick="toggleDisp(this.nextSibling)">Menu1</div>
<div class="subMenu">
<a href="link1.htm" onClick="doLink(this.href);return false;">Link1</a><br>
<a href="link2.htm" onClick="doLink(this.href);return false;">Link2</a><br>
<a href="link3.htm" onClick="doLink(this.href);return false;">Link3</a>
</div>
</div>
</td>
<td valign="top">
<div class="menu">
<div class="item" onClick="toggleDisp(this.nextSibling)">Menu1</div>
<div class="subMenu">
<a href="link1.htm" onClick="doLink(this.href);return false;">Link1</a><br>
<a href="link2.htm" onClick="doLink(this.href);return false;">Link2</a><br>
<a href="link3.htm" onClick="doLink(this.href);return false;">Link3</a><br>
</div>
</div>
</td>
<td valign="top">
<div class="menu">
<div class="item" onClick="toggleDisp(this.nextSibling)">Menu3</div>
<div class="subMenu">
<a href="link1.htm" onClick="doLink(this.href);return false;">Link1</a><br>
<a href="link2.htm" onClick="doLink(this.href);return false;">Link2</a><br>
<a href="link3.htm" onClick="doLink(this.href);return false;">Link3</a>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>
Vidishasharma
01-23-2004, 10:42 AM
i have to do something simillar Pls let me know if u got the solution also what i wat can be looked in site
http://www.nseindia.com/ the type of menus which get displayed on left hand site on clicking on the horizontal menu how is that done.....
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.