|
|
The background images is missing in cascade menu
Return to Recent Questions
Q:
I need to include background images in my cascade menu, so I put them in the same folder where the
"data.js" file can be found.
I am using the DHTML Tuner to assign these files and cascade menu looks great in the preview.
As soon as I save the file and load it in the browser, the background images are missing.
How I can fix this problem?
A:
Now you have the following paths for all your images "data.files/image.gif"
var itemStyles = [
["itemWidth=128px","itemBackImage=data.files/nav01_off.gif,data.files/nav01_off.gif"],
["itemWidth=128px","itemBackImage=data.files/nav02_off.gif,data.files/nav02_off.gif"],
["itemWidth=128px","itemBackImage=data.files/nav03_off.gif,data.files/nav03_off.gif"],
["itemWidth=128px","itemBackImage=data.files/nav04_off.gif,data.files/nav04_off.gif"],
["itemWidth=128px","itemBackImage=data.files/nav05_off.gif,data.files/nav05_off.gif"],
];
But you don't have images in "data.files/" folder. That's why you
can't see them.
Check your paths.
You can use additional parameters to make cascade menu paths absolute:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
These parameters allow to make images and links paths absolute.
For example:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
var menuItems = [
["text", "index.html", "icon1.gif", "icon2.gif"],
];
So, link path will be look so:
http://domain.com/pages/index.html
Images paths will be look so:
http://domain.com/images/icon1.gif
http://domain.com/images/icon2.gif
Try to use these parameters.
Return to Recent Questions
Related:
- March 15, 2009 - How can I disable items in dhtml menu samples?
- March 16, 2009 - How can I change item width in the Vista templates in the css menu drop down?
- March 20, 2009 - Links don't work in the navigation menu javascript. How can I correct this?
- March 21, 2009 - How can we increase the width of the vista style buttons of menu navigation?
- March 31, 2009 - Is there any way can we display submenu items on mouse over in form drop down menu?
- Apr 27, 2009 - In my dhtml menu dropdown I'm getting an error - Error: 'floatable' is undefined...
- Apr 28, 2009 - There is some bug with your menu and button maker and Page Zoom function in IE7.
- May 03, 2009 - Will I have issues with the key in down menu in html if my site has multiple host headers?
- May 16, 2009 - The alignment of the submenus is not correct in my menu using java script.
- May 17, 2009 - What is the correct method of referencing the webroot in the css list menu?
- May 23, 2009 - Can I specify an image in place of text or background in my dhtml drop down menu?
|