Recent Questions Extjs Treepanel Ui Addclass
Q: I have the dynamic dropdown menu working perfectly on the main page of the website, but when I try to install it onto html files that appear in subfolders of the site, the images do not appear. I have put ../ before all the links I can find and have the following codes placed in my file, what am I doing wrong?
A: You can use additional parameters to make dynamic dropdown 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
Please, try to use these parameters.
Q: How do I make the top nav buttons exactly the same width for each button?
Total menu width is 743px and I have 6 buttons I want the width of each button to be fixed at 123px.
I set var menuWidth="743" but it averages out the buttons based on the text.
A: You should use individual item styles. For example:
var itemStyles = [
["itemWidth=123px"], //style 0
];
var menuItems = [
["Home","testlink.html", , , , , "0", , , ], //style 0
["Product Info","", "deluxe-menu.files/icon1.gif", "deluxe-menu.files/icon1o.gif", , , "0", , , ], //style 0
Q: If there was a way to show the links inside the html code instead of the dhtml menu js files. Shouldwe use an alternative mode as (css Style?)
A: You can move menuItems into html page directly inside <script> ...
</script> tags:
<script>
var menuItems [
...
];
dm_init();
</script>
You can also use search engine friendly code and install it on yourpage before you call your dhtml menu js file.
You'll see text links in that case.
To create a search engine friendly menu you should add additional html code within your html page:
<div id="dmlinks">
<a href="http://deluxe-menu.com">menu_item_text1</a>
<a href="http://deluxe-tree.com">menu_item_text2</a>
...etc.
</div>
To generate such a code use Deluxe Tuner application.
Run Tuner, load your menu and click Tools/Generate SE-friendly Code (F3)
Q: I am trying to implement JavaScript Tree Menu 2.0 on a .aspx-page.
However the Norwegian characters are not showed correctly. (only in the menu)
What do I need to do?
It works fine with the old version of JavaScript Tree Menu in our normal asp-pages.
A: When you call data .js file you can try to specify the encoding:
< SCRIPT src="Dansk Aktionarforening11_files/data.js" charset="UTF-8"> </SCRIPT>
or
<SCRIPT src="Dansk Aktionarforening11_files/data.js" charset="ISO-8859-1"> </SCRIPT>
Try that.