PDA

View Full Version : displaying flyout layers in a frameset page


mdo4
11-19-2002, 01:27 PM
Hello Guys:

I have a header flyout menu that uses <div> tags that contains styled layers (z-index=2) that either hides or shows the visibility with onMouseOver events using absolute positioning for placement. This works great on most of my pages. But I need to implement this on a page that uses framesets. What happens is the flyout only shows up to the point that the top frame ends and the main frame begins. I understand how this happens, each frame is an individual html page, therefore absolute positioning is meaningless in an "inter" page environment such as this. Has anybody ever ran across this problem? Is there any way to hand off coordinates between frames to give an effect of a frameset-less page? Much thanks for the help.

-Mike

kdjoergensen
11-19-2002, 01:34 PM
Sure. You can probably figure it out yourself, too.

This is how I break it down:

1. You know that you want to position the layers in the second frame instead of the first. So you need to be able to communicate with the other frame. How do you do that ?

2. You need to position the element at the top of the 2nd page. Since this page could be scrolled you need to use y = 0 + scrolled amount. This differs for MSIE/NS4/NS6. Read up on those..

3. You need to keep the newly positioned element open long enough that the user can exit the top frame and move the mouse into the bottom frame (and on top of the open element). So you need some kind of closing pause before folding the menu back.

Hope this gave you enough to get started...

mdo4
11-19-2002, 01:50 PM
Thank you Kenneth for your answer:

To make this more difficult I actually need the layer to be displayed with the top frame AND the main frame... here, I attached a screenshot of what I'm doing... if you notice, the flyout stops at 'electric transmission' when there is actually more menu items to display. So it needs to start at the first frame and continue seamlessly within the main frame..

-Mike

kdjoergensen
11-19-2002, 02:18 PM
Yes, that should be simple enought ? right ?

If you do as explained above you can position the menu in the bottom frame.

The only 3 other things you have to do is this:

1. display the menu also in the top frame also. that should be fairly simple

2. you know that your menu will cut off at xx pixels height where xx = the height of the frame in pixels minus the y position of the element in the top frame. e.g. if your frameset has dictated that the top frame is 100 pixels in height and you have positioned your element at 25 pixel Y position, then the element will cut off at 100-25 = 75 pixels.

3. with this information you now clip your element in the bottom frame to start at this pixel amount.
e.g. document.getElementById('elmName').style.clip="rec(top,right,bottom,left)";

mdo4
11-19-2002, 02:27 PM
Kenneth,

Thank you so much, it looks like this will work, at least get me in the right direction...


Best Regards
-Mike

kdjoergensen
11-19-2002, 03:01 PM
As you go along, post individual questions related to the specific (sub)problems you are working on.. there is more help to get if you ask !!!