|
|
|
The background images is missing in drag drop javascript
Return to Recent Questions
Q:
I need to include background images in my drag drop javascript, 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 drag drop javascript 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 drag drop javascript 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, 2007 - How can I disable items in drop down menu examples?
- March 16, 2007 - How can I change item width in the Vista templates in the css dhtml menu?
- March 20, 2007 - Links don't work in the html dropdown menus. How can I correct this?
- March 21, 2007 - How can we increase the width of the vista style buttons of dhtml popup menu?
- March 31, 2007 - Is there any way can we display submenu items on mouse over in flyout menus?
- Apr 27, 2007 - In my java dropdown menu I'm getting an error - Error: 'floatable' is undefined...
- Apr 28, 2007 - There is some bug with your dynamic menu items and Page Zoom function in IE7.
- May 03, 2007 - Will I have issues with the key in javascript drop down menu if my site has multiple host headers?
- May 16, 2007 - The alignment of the submenus is not correct in my down menus in css.
- May 17, 2007 - What is the correct method of referencing the webroot in the submenu javascript?
- May 23, 2007 - Can I specify an image in place of text or background in my vertical menus?
|