position="relative" and iFrame problem
-
- Super Advanced
- Posts: 32
- Joined: Sun Jun 13, 2004 11:05 pm
- Location: Rotterdam, The Netherlands
- Contact:
position="relative" and iFrame problem
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
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
-
- Super Advanced
- Posts: 32
- Joined: Sun Jun 13, 2004 11:05 pm
- Location: Rotterdam, The Netherlands
- Contact:
I would, but currently it's not online. The current website is running version 3.Ruth wrote:Could you post a url for the page so we can check it out?
Ruth
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.
-
- Super Advanced
- Posts: 32
- Joined: Sun Jun 13, 2004 11:05 pm
- Location: Rotterdam, The Netherlands
- Contact:
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
Ruth
-
- Super Advanced
- Posts: 32
- Joined: Sun Jun 13, 2004 11:05 pm
- Location: Rotterdam, The Netherlands
- Contact:
Thanks, added the function. However in menusample11 you'll see the status text in the status bar.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
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
-
- Super Advanced
- Posts: 32
- Joined: Sun Jun 13, 2004 11:05 pm
- Location: Rotterdam, The Netherlands
- Contact:
Swet:
Try posting your iframe code here. For example
won't work unless you have 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.
Try posting your iframe code here. For example
Code: Select all
target=iframe
Code: Select all
name="iframe"
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.
Oh Saratoga!
-
- Super Advanced
- Posts: 32
- Joined: Sun Jun 13, 2004 11:05 pm
- Location: Rotterdam, The Netherlands
- Contact:
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 )mfurf wrote:Swet:
Try posting your iframe code here. For example
won't work unless you haveCode: Select all
target=iframe
in your iframe specs.Code: Select all
name="iframe"
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.
Just look at http://www.123swets.com and view the source of the index.
-
- Super Advanced
- Posts: 32
- Joined: Sun Jun 13, 2004 11:05 pm
- Location: Rotterdam, The Netherlands
- Contact:
-
- Super Advanced
- Posts: 32
- Joined: Sun Jun 13, 2004 11:05 pm
- Location: Rotterdam, The Netherlands
- Contact:
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)
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)