Recent Questions Treeview For Javascript
Q: I had create a website navigation bar ,in that I need to give separator. But its not working.
Please advise.
A: To add a separator you should
//--- Separators
var separatorImage=""; //for subitems (top items in vertical menu)
var separatorWidth="100%";
var separatorHeight="3px";
var separatorAlignment="right";
var separatorVImage="separator.gif"; //for the top items (subitems items in vertical menu)
var separatorVWidth="100%";
var separatorVHeight="2px";
var separatorPadding="";
You can create separators using menuItems (you can do it in DeluxeTuner, use "Add separator" button), for example:
var menuItems = [
["item 1"],
["-"], // this item is separator
["item 2"],
];
Q: Can I install the menu using my buttons? I might be able to do it if the buttons used only one image, but they use two images. One is light and the other dark.
I also have some questions:
1) Will the menu stay in view when the user scrolls down?
2) I'm not even sure I care if the menu stays in view, because I believe that is done using php and is not good for SEO. The file that the search engines see is index.html while the file that visitors see is home.php. I think it would be better for SEO to have a normal .html page. Are you able to do that?
A: See how you should make image-based menus: if item text is empty, icon fields will be used as item images.
For example:
["", "index.html", "menu1a.gif", "menu1b.gif", "Home Page"]
1) You should use floatable feature.
See the following parameter:
var floatable=1;
2) You can generate search engine friendly code using Deluxe Tuner:
"Tools/Generate SE-friendly Code".
Q: I appreciated your prompt response. However, if I set the exact height for easy tabs content, certain tab's content will not show up fully. We need to have every tab has different height in this site. Do you know why IE 7 doesn't behavior properly but IE 6 does? Can you provide a work around for me ASAP?
A: In that case you should delete height parameter at all from yourstyles.
<div id="content1" style="visibility: hidden;" class="tabPage">
Q: Typically in order to generate a menu with multiple layers I’d put a pipe character in front of the menu text.. For example:
["|Page Admin","/admin/handoutadmin.php", , , , "_new", , , , ],
["||Student Pages","/admin/handoutadmin.php?type=1", , , , "_new", , , , ],
["||Teacher Pages","/admin/handoutadmin.php?type=2", , , , "_new", , , , ],
["||Family Letters","/admin/handoutadmin.php?type=4", , , , "_new", , , , ],
["||Transparencies","/admin/handoutadmin.php?type=3", , , , "_new", , , , ],
However, when I try to do it with dm_ext_addItem it actually SHOWS the pipe character and doesn’t create any menu levels at all.
For example:
dm_ext_addItem(0, 0, ["Add a Handout to this Lesson", "", "", "", "", "", ""]);
dm_ext_addItem(0, 0, ["|Student Page","/admin/handoutadmin.php?type=$type", "", "", "", "_new", ""]);
dm_ext_addItem(0, 0, ["|Teacher Page","/admin/handoutadmin.php?type=$type", "", "", "", "_new", ""]);
How can I generate multiple levels of the menu with javascript?
A: I suppose that your code is not valid
dm_ext_addItem(0, 0, ["|Teacher Page", "/admin/handoutadmin.php?type=$type", "", "", "", "_new", ""]);
Try to write it in the following way:
dm_ext_addItem(0, 0, ["|Teacher Page", "/admin/handoutadmin.php?type=", "", "", "", "_new", ""]);