(c) 2007, DHTML-Menu.com
 
   
   
  Support
  Recent Questions
  Write To Support
 

    The background images is missing in dhtml drag drop

Return to Recent Questions


Q: I need to include background images in my dhtml drag drop, 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 dhtml drag drop 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 dhtml drag drop 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:
   
Copyright (c) 2012, DHTML-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. parallax scrolling | kostenlose website | website designing software | HTML5 Video Player | jQuery Slider Free Download