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

Menu with pictures???


Poster: ttmobil
Dated: Wednesday March 7 2007 - 6:30:26 GMT

Hello!

I have a problem with my menu.

I want to put the menu in a table.
The menu sould work with images! But it doesnt work!

Here is your example:
<script language=JavaScript src="milonic_src.js" type=text/javascript></script>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js></scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js></scr"+"ipt>");
</script>
<script language=JavaScript src="menu_data.js" type=text/javascript></script>

<table>
<tr>
<td>
<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=My Milonic;");
}
drawMenus();
</script>
</td></tr>
</table>

And this is my idea:

<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=dateien/menu_neu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=dateien/menu_neu/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="dateien/menu_neu/menu_data.js" type=text/javascript></SCRIPT>

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=104;
left=196;
alwaysvisible=1;
orientation="horizontal";
aI("image=dateien/menu_neu/home.gif;overimage=dateien/menu_neu/home_on.gif;url=../index_4.htm;target=index_4;status=welcome to ttr-friends.com;");
aI("image=dateien/menu_neu/ttr_wissen.gif;overimage=dateien/menu_neu/ttr_wissen_on.gif;url=http://www.ttr-friends.de/wbb2/board.php?boardid=22;target=index_4;status=welcome to ttr-friends.com;");
aI("image=dateien/menu_neu/forum.gif;overimage=dateien/menu_neu/forum_on.gif;url=../index_5.htm;target=index_4;status=welcome to ttr-friends.com;");
aI("image=dateien/menu_neu/gaestebuch.gif;overimage=dateien/menu_neu/gaestebuch_on.gif;url=../index_4-dateien/gaestebuch/index.htm;target=index_4;status=welcome to ttr-friends.com;");
aI("image=dateien/menu_neu/ttr_friends.gif;overimage=dateien/menu_neu/ttr_friends_on.gif;url=../index_4-dateien/ueber_uns/index.htm;target=index_4;status=welcome to ttr-friends.com;");
aI("image=dateien/menu_neu/sonstiges.gif;overimage=dateien/menu_neu/sonstiges_on.gif;url=../index_4-dateien/sonstiges/index.htm;target=index_4;status=welcome to ttr-friends.com;");
}
drawMenus();



Where is my mistake??? Thanks for your help!!!!

Sorry, for my english!


Tim


Poster: Ruth
Dated: Wednesday March 7 2007 - 7:25:48 GMT

Hi Tim,

Your English is fine.

We need to see the site, or a test page so we can see the problem and have all the files to figure out why it's not working.

Ruth


Poster: ttmobil
Dated: Wednesday March 7 2007 - 17:00:18 GMT

Hi!

So here is the testpage with your menu.

http://www.ttr-friends.de/test/head.htm


Thanks for your help!


Bye Tim


Poster: Ruth
Dated: Wednesday March 7 2007 - 17:55:09 GMT

Hi,

Thanks for the text page.

The call for the files has to be before the main menu or it doesn't have any program to tell it to be alwaysvisible, to show the images etc.


Code:
<BODY style="BACKGROUND-POSITION: center 50%; BACKGROUND-IMAGE: url(backg.jpg)"
leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"><SCRIPT language=JavaScript src="milonic_src.js"
  type=text/javascript></SCRIPT>

  <SCRIPT language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js></scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js></scr"+"ipt>");
</SCRIPT>

  <SCRIPT language=JavaScript src="menu_data.js"
  type=text/javascript></SCRIPT>
<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=1>


and then the rest of the page.

Also, your image and overimage must be the same size or the menu 'shifts' as the item size becomes smaller then larger on mouseover and mouseout.

So, gaestebuch_on.gif is 112 by 22, but the gaestebuch.gif is only 102 x 21.

Ruth


Poster: ttmobil
Dated: Wednesday March 7 2007 - 18:39:22 GMT

Hi!

Thanks, it works.

But there is another problem.

I want to put the menu over the image "head_1_heller.jpg" in the head!!!!
Is that possible????


Quote:
<table width="900" cellSpacing="0" cellPadding="0" border="1">
<tr>
<th align="center" width="100%" valign="top"><map name="head">
<area shape=rect coords="660,10,710,20" href="../swf/samstag.html" target="haupt">
<area shape=rect coords="724,10,792,20" href="dateien/impressum.htm" onclick="NewWindow(this.href,'mywin','560','480','no','center');return false" onfocus="this.blur()">
<area shape=rect coords="805,10,877,20" href="dateien/datenschutz.htm" onclick="NewWindow(this.href,'mywin','560','320','yes','center');return false" onfocus="this.blur()">
<Img src="dateien/head_1_heller.jpg" width="900" height="199" border="0" usemap="#head"></th> ......


Poster: Ruth
Dated: Wednesday March 7 2007 - 20:01:32 GMT

Hi,

No, you can't do that. How are you going to put something on top of an image? I mean I know there are ways to do text by using divs and putting them on top of each other, but I don't know how you'd do that with the menu, and if you can figure a way to do it, how will you use the image map, the menu would be over it.

Where do you want it at the top? If you just want it closer under the Logo, then I suggest you cut that image down to just under the logo which would shift the table cell that has the menu up closer to it.

Ruth


Poster: Ruth
Dated: Sunday March 11 2007 - 7:13:40 GMT

Hi Again,

I was thinking, and if you don't want to put the menu into a table cell then you can put it over your image. You would put the main menu back into the data file, remove the position=relative; and add a top and left position. You would have then positioned it absolutely and it will sit on top of the page wherever you put it. However, it will always be at that position no matter what the resolution is. That works OK in most cases especially if the layout is 100%, but in some if you have say a centered 800x600 layout, then the menu wouldn't move with the layout when resolution was changed.

One other way you could do it, would be to cut that image in two and make two table cells up there, the left one you'd use the left side of the image as a bgimage, not an image, and the right one would be whatever is left for the image map.

Ruth


Poster: ttmobil
Dated: Tuesday March 13 2007 - 16:42:29 GMT

Hi!

Thank you for your help!

I cut the picture in two pices and put each pic in an other cell!
So everything works!


Thanks again!

Tim