Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:58

Iframe restricts size of popup menu


Poster: edenjon
Dated: Tuesday August 8 2006 - 14:15:47 BST

Hi all,

I'm trying to get a popup menu to appear over a graph that I've got appearing in an IFrame. The main problem that I have is that the height of the menu is more than the height of the IFrame. As such it currently gets cut off and I only see the bottom part of the popup menu.

Obviously what I'd like to happen is have the menu sit above the Iframe.

Is there a setting that would allow me to do this or will I need to somehow pass the menu info to the parent of the iframe and make the menu display in that frame?

Thanks in advance for any help...

Cheers,

Jon


Poster: Ruth
Dated: Wednesday August 9 2006 - 5:55:22 BST

Hi,

We are going to have to see the page to see what's going on. The menu should sit over the iframe with no problem, so I think I am not understanding what you are asking or what is happening.

Ruth

What is best set of info


Poster: edenjon
Dated: Wednesday August 9 2006 - 8:11:02 BST

Hi Ruth,

That's encouraging that it's meant to work! ;)

What is the best set of information to give you? Screen shots, code from the page(s) etc?

Regards,

Jon


Poster: Ruth
Dated: Wednesday August 9 2006 - 10:37:01 BST

Hi Jon,

The best would be a test page with everything on it so I can get all the files and experiment to see what's going on. If that is not possible, then the next best is to put all the coding here using the code button above.

I'd need the html, the menu_data info, any css. If you are using images, and are posting here, I would at least need the names and sizes. Then I can try to make blanks and use those names.

As you can see a test page is best since it would have everything, but I can try to put it together if you give me the necessary coding.

Ruth


Poster: edenjon
Dated: Wednesday August 9 2006 - 10:43:19 BST

Hi Ruth,

Could you let me know your email address so I can send you a link to the page along with a username and password - the code is rather complex and it maybe best to see it in situ...

Best Regards,

Jon


Poster: Ruth
Dated: Wednesday August 9 2006 - 19:59:45 BST

Hi Jon,

I sent you an email so you'd have the address. I don't post here anymore since many people started sending emails for help instead of posting in the forum.

Ruth


Poster: Ruth
Dated: Thursday August 10 2006 - 9:20:49 BST

Hi,

Well, there is one problem. You don't just have the menu in an iframe, you have the menu in an iframe that is nested inside another iframe. The menu is going 'under' the iframe in which its own iframe is nested because it can't sit over an iframe when it's 'below' it to begin.

Hope that made sense.

What you are doing is much more advanced than I am able to do, however, there are some 'work arounds'.

The first and probably the best is to make some changes in that menu. I don't know if it's going to get even longer or larger which could be a problem but if it remains as it is you can do the following. This is going to be a bit long because I'm not really sure how to clearly explain it.

Right now you have seven items. You need to add a blank item right below the top one that will only have the green header bg image in it, no text. You're using that menueditapi module so I'm not really able to figure out how to do that, but you need to have that, making sure nothing goes in it but that bgimage..no text. This will give you 8 items [they divide equally]

Next, you add divides=2; to your menu, up where the style is listed. This will now give you a menu that is vertical with two columns, the top of the first one will have the Jobs for whatever the number is, and the top of the second column will be empty with only the bgimage, that will make that header part look like it goes across the top of the menu. The rest of the items will be divided into the columns, 3 in the left and 3 in the right.

Finally, you need to set up where you put the divides, screenposition="center;middle"; This will force the menu to be in the center and the middle, putting it far enough down so it doesn't hide.

Oops, I forgot, since you're using the menueditapi module, you'll have to do whatever you need in that to make the items be where they're supposed to be. I tried just adding a blank, and it wouldn't give me one, instead it put the 2nd item at the top right and adding an extra total jobs :oops:

___________________

Option 2, and I have no idea how you'd do this since I do very little with divs or with forcing a popup to open someplace from a click on another page, though I'm pretty sure it can be done using a js function.

Either fix it so the menu opens from the VSMM whatever page, the one where you have placed the iframe for that graph. Put the menu on the VSMM page and have it open from that header div where it says Planned Jobs All Centers 30 Days, so when you click that arrow in that div the menu opens, and it will drop over the iframe with the graph. Or if you can do a function which will tell the pop up which you have on that graph page, to open on the VSMM page.

I hope that made sense. I can usually figure out what's happening, and what needs to happen, but not the functionality to do it.

Ruth

Ouch


Poster: edenjon
Dated: Thursday August 10 2006 - 9:36:28 BST

Hi Ruth,

Thanks very much for taking a look at that!

I think that I'm going to have to go for the 2nd option. Other areas of the system have popup menus so to do a different style there could be confusing, and also potentially a problem when the user chooses a different language - it could still go off screen..

The 2nd option is one that I had wondered about myself earlier but for the obvious reason of complexity had avoided! Looks like I'll need to bit that bullet now :( I think that the only problem will be positioning of the menu but I'm sure that I can get around that with a little experimentation.....

Thanks again for your help on this!

Best Regards,

Jon

One last issue


Poster: edenjon
Dated: Thursday August 10 2006 - 10:18:55 BST

Hi again Ruth,

I've managed to get the menu simply by having it setup in the parent IFrame and then referencing it from the child IFrame as you suggest.

I'm now seeing some odd stuff going on with the positioning of the menu. I wasn't expecting the menu to appear where the mouse click happened but what I am finding is that there is no obvious pattern as to where the menu appears other than being almost always lower on the screen than the iframe is. Clicking in roughly the same area can produce some very different results.

I'm goign to try and put some debugging alerts into the js files if I can figure out where the coordinates are located. Any pointers would be much appreciated.

Best Regards,

Jon


Poster: Ruth
Dated: Thursday August 10 2006 - 15:11:33 BST

Hi,

Take a look at the methods and functions section of the Menu Quick Properties Reference Guide http://www.milonic.com/menu_methods.php

maybe something there will help you. You can set offsets for the pop up position if you're using an image to position the popup, I'm not sure if you can do that using just the popup and the 1 which tells it mouse coordinates for opening the menu, but you might try popup('menuname',1,10,20); and see if that would work, where the 10 is the top offset and 20 the left offset, of course you'd use whatever ones you needed.

If it's possible to click on the graphic put pop the menu into the 'main iframe' and have it position at the img src "142-fieldset-header-icon.gif" then you should be able to set the offsets for the menu based on that image. And since it's the main iframe in which that secondary graphics iframe is placed, then the menu should drop over that iframe. Hope that made sense.

Sorry I'm not more knowledgeable about this to be able to help you more.

Ruth

Fantastic


Poster: edenjon
Dated: Thursday August 10 2006 - 16:12:57 BST

That's fantastic,

Thanks Ruth, It works a treat. I'd seen that I could use an image as an anchor but hadn't thought to use that fieldset image. Now I just need to tie it in with the mouse position a bit better.

Thanks so much for all your help!

Best Regards,

Jon


Poster: Ruth
Dated: Thursday August 10 2006 - 19:41:21 BST

Hi Jon,

You're welcome. Email when you get it done so I can see. Not that I can do anything like it, but I really like that layout and design. Very, very nice.

Ruth

Done - for now!


Poster: edenjon
Dated: Friday August 11 2006 - 8:22:45 BST

Hi Ruth,

I've just finished it - I added a image to each menu item so that it ties into the various graph colours and also the colours in the summary box above the graph. Works very well and I'm sure that the user of it will find it very useful.

Thanks for your comments re the design and layout. It's been quite a while in the making but I am now making massive strides with it. The other version of it - the fmNet - looks much better in my opinion as it uses blue rather than green as the predominant colour.

Thanks again for your help!

Regards,

Jon