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:24

position="relative" and iFrame problem


Poster: Swetsenegger
Dated: Sunday June 13 2004 - 23:13:15 BST

I've got a small issue with the DHTML menu and relative positioning.

I've read http://www.milonic.co.uk/menusample9.php and done everything accoordingly. And it's working, however the first url in the mainmenu is not working correctly:

<TD colspan="2" rowspan="2" width="125" height="534">


<script language="Javascript" type="text/javascript">
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text=Introductie;url=introductie.htm;target=iframe;status=Welcome;");

aI("text=IJsland;showmenu=ijsland;;status=Verslag van de rondreis op IJsland;");
aI("text=Persoonlijk;showmenu=Persoonlijk;;status=Over huwelijken en kinderen;");
aI("text=Links;showmenu=URL;;status=Andere must see sites;");
aI("text=Contact;showmenu=contact;;status=Mail of ICQ ons;");

}
drawMenus();
</script>
</TD>


In the statusbar I don't see 'Welcome' as defined in the status, and when clicking the 'introduction' url it does not open in the iframe, but just in the complete window.
It's only this URL in the main menu. All url's in the submenu's DO open fine in the target iframe.

Any idea's?

-edit- ow, closeonclick is also not working :?:


Poster: Ruth
Dated: Sunday June 13 2004 - 23:15:46 BST

Could you post a url for the page so we can check it out?

Ruth


Poster: Swetsenegger
Dated: Sunday June 13 2004 - 23:20:18 BST

Ruth wrote:
Could you post a url for the page so we can check it out?

Ruth

I would, but currently it's not online. The current website is running version 3.

I could upload this one, but frankly is all information in the first post. When I remove postion="relative", then ofcourse the menu is not correctly positioned but the first url is doing what it should.


Poster: Swetsenegger
Dated: Sunday June 13 2004 - 23:26:46 BST

I uploaded the new page:

http://www.123swets.com


Poster: Ruth
Dated: Monday June 14 2004 - 0:06:39 BST

Thanks. I'm sure someone will be able to help you. This is not something I do, I've never done anything with iFrames. But, one thing, did you read up on iframes? I know there's some kind of code that needs to be in the page for the menu to work with them, some function. Here's a link to the SAMPLE#11 which has the information, down about the middle of the page I think.

Ruth


Poster: Swetsenegger
Dated: Monday June 14 2004 - 7:54:19 BST

Ruth wrote:
Thanks. I'm sure someone will be able to help you. This is not something I do, I've never done anything with iFrames. But, one thing, did you read up on iframes? I know there's some kind of code that needs to be in the page for the menu to work with them, some function. Here's a link to the SAMPLE#11 which has the information, down about the middle of the page I think.

Ruth


Thanks, added the function. However in menusample11 you'll see the status text in the status bar.
When I add it in the same way, I see 'Javascript:OpenIframe('

It seems the 'position is relative' is messing up the mainmenu function.

As a workaround I now made the url in the mainmenu also a 'showmenu' and in the showmenu I put the actual URL to the iframe.
But this is not very clean, so if anybody has a sollution


Poster: Swetsenegger
Dated: Monday June 14 2004 - 22:32:40 BST

Did I find a real bug?

:)


Poster: mfurf
Dated: Tuesday June 15 2004 - 0:56:11 BST

Swet:
Try posting your iframe code here. For example

Code:
target=iframe


won't work unless you have
Code:
name="iframe"
in your iframe specs.

Methinks it's unusual to name an iframe by its own handle "iframe" but it should work. If it's your main iframe try name="main" or some such and reword your target statement accordingly.

Not sure about the status problem.


Poster: Swetsenegger
Dated: Tuesday June 15 2004 - 8:31:51 BST

mfurf wrote:
Swet:
Try posting your iframe code here. For example

Code:
target=iframe


won't work unless you have
Code:
name="iframe"
in your iframe specs.

Methinks it's unusual to name an iframe by its own handle "iframe" but it should work. If it's your main iframe try name="main" or some such and reword your target statement accordingly.

Not sure about the status problem.

Of course my iframe is ok. All other urls are working fine. It's ONLY when using a direct url in the main menu. If I first link to a submenu everything is fine. If I remove 'position= relative' it's ALSO working fine (besides the position of the menu :) )

Just look at http://www.123swets.com and view the source of the index.


Poster: Swetsenegger
Dated: Tuesday June 15 2004 - 16:07:52 BST

The problem is (almost) solved. I redesigned the site to an overflow div instead of an iframe.

This because of XHTML1.1 compatibility


Poster: Swetsenegger
Dated: Saturday July 3 2004 - 11:31:20 BST

Unfortunately this bug still exists.

When doing a relative positioning, placing the data of the main menu inside the HTML it's not possible to put a direct URL in the main menu.
More precise, it will open in a new window (and not in a target when using frames) en the status text does not show.
The sollution is obvious, do not place any direct links in the main menu, but always direct to a submenu. Put the direct link in the submenu.

This workaround leaves one small bug. The status texts of the mainmenu are still not shown in the statusbar of IE (did not test any other browser)