Recent Questions Dhtml Sliding Tree
Q: I'm having multiple problems with this now, I'm using this sight in the horizontal cross-frame style. And using the CSS-type layout.
Problems:
1. This appears to be working fine in Firefox but I can't see the Menu or frames in Internet Explorer.
2. I have changed the colors in the data.js and the css-mode.css files and still can't change the subMenu background colors. ( I have put everything back like it was, but for example if I want to change the submenu or drop down menu background color to grey and the mouseover color to red where do I change that at)? Do I edit the .css file or the data.js file
3. I can't get the links to open in the bottom frame ( I know you will see that it's set to _blank now, but I tried setting the var itemTarget="_bottommenu"; and the code in the menu section at the bottom of the data.js to the same but it still doesn't seem to work. Can you help me out here?
I have attached the sight so that you can see what I'm dealing with.
Once again, thanks for your help and any advice.
A: 1) Your menu works fine in all browsers.
2) Your should add the following line into the bottommenu.htm file.
<link href="data-samples/css-mode.css" type=text/css rel=stylesheet>
You should set the item color for the submenus in your css file initemNormal and itemOver styles.
3) You should use the following parameter to set a frame name:
var itemTarget="";
["Home","testlink.htm", "css/icon1.gif", "css/icon12.gif", "Home", "frm2", "0", "0", , ],
["Products","", "css/icon2.gif", "css/icon22.gif", "Products", , "0", , , ],
["|Hard Drives","testlink.htm"],
["|Servers",""],
["||Linux Compatible","testlink.htm", , , , "frm2",],
["||Windows Compatible","testlink.htm", , , , "frm2",],
...
Q: > You should call the following function:
> dtreet_ext_getItemIDByIndex (0, 12)
> where 12 - is index of the item.
How would I know that 12 is the index of the item? How is itemInd different from its itemID? I assume the menuInd is always 0 for the first menu (or only in my case) menu on a page?
A: Yes, menuInd is the number of the menu on your page (in your casemenuInd=0).
itemInd is the number of the item in your menuItems, for example:
var tmenuItems =
[
["Home", "http://deluxe-tree.com", "icon1_t.gif", "icon1_to.gif","", "Home Page Tip","_blank"],//itemInd=0
["<img src='data_files/images/sep.gif' width=113 height=1>"],//itemInd=1
["+What's New<br><span id='letter'>This is pretty cool. I need to buy this deluxe menu</span>", "", "icon2_t.gif", "icon2_to.gif", "", "Product Info Tip"],//itemInd=2
["|What's New", "testlink.htm", ""], //itemInd=3
["|Features", "testlink.htm", ""], //itemInd=4
["|Installation", "testlink.htm", ""], //itemInd=5
["|Functions", "testlink.htm", ""], //itemInd=6
["|Supported Browsers", "testlink.htm", ""], //itemInd=7
["Samples", "", "icon3_t.gif", "icon3_to.gif", "", "Samples Tip"], //itemInd=8
["|Sample 1", "testlink.htm", ""], //itemInd=9
["|Sample 2", "testlink.htm", ""], //itemInd=10
["|Sample 3", "", ""], //itemInd=11
["||New Sample 1", "testlink.htm", ""],//itemInd=12
["||New Sample 2", "testlink.htm", ""],//itemInd=13
Q: I am setting a menu up for popupMode=1 and adding the javascript to respond to the onContextMenu action. When it pops up I am having to immediately move the mouse over the menu to keep it visible. Is there any way to keep the menu from doing this?
A: You can try to play with these parameters:
var smShowPause=200;
var smHidePause=1000;
Q: I got the menu to display across frames, but it displays differently in Firefox & Mozillavs. Internet Explorer. Is that to be expected?
In The Mozilla-based browsers, the submenu butts right upunder the main menu – which is how I want it. In IE, it is about 10 pixels below.
Also, I can’t get the submenus to drop down directly under the main menus – they are offset by about 100 pixels to the right.
A: The problem is in a structure of your frameset.
Mozilla browsers can't determine absolute coordinates for a frame, sosubmenus drop down with an offset.
You should create the following frameset structure:
--|------------
   | menu
--|------------
   |
   | submenus
   |
Now a top row has 2 columns and all browsers can determine awidth of the 1st column in the second row.