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:13
How to specify global image directory?
Poster: mfindlay
Dated: Tuesday August 24 2004 - 18:12:26 BST
Using Milonic 5.42 registered.
Is there a prooperty that can be set to indicate to the menu system a global directory where it will find all images? (i.e. submenu arrow images, etc) regardless of where the menu is used in the site?
Thanks!
Poster: Andy
Dated: Tuesday August 24 2004 - 18:21:42 BST
Hi,
The best way to do this is to use a variable that you pass to all images.
The variable is declared at the top of the data file and is re-used when you need to declare an image.
Here's a sample:
Code:
var imgLocation="http://www.milonic.com/images/";
with(menuStyle=new mm_style()){
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="#DCE9F0";
offcolor="#515151";
image=imgLocation+"image.gif";
subimage=imgLocation+"subimg.jpg";
}
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
aI("text=Home;image="+imgLocation+"image1.gif;url=http://www.milonic.com/;");
aI("text=Home;image="+imgLocation+"image2.gif;url=http://www.milonic.com/;");
aI("text=Home;image="+imgLocation+"image3.gif;url=http://www.milonic.com/;");
}
with(menuStyle=new mm_style()){
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="#DCE9F0";
offcolor="#515151";
image=imgLocation+"image.gif";
subimage=imgLocation+"subimg.jpg";
}
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
aI("text=Home;image="+imgLocation+"image1.gif;url=http://www.milonic.com/;");
aI("text=Home;image="+imgLocation+"image2.gif;url=http://www.milonic.com/;");
aI("text=Home;image="+imgLocation+"image3.gif;url=http://www.milonic.com/;");
}
Hope this helps
Andy