Recent Questions Struts Tiles Tree Menu Example
Q: Why is it that when we place a drop menu ina div that the droppping part is not right uner the menu? The menu on top banner is the problem.. Thesame code outside of a div futher down the page works fine.
I can place the same menu outside of the div and it works fine.When it is in a div the drop part of the menu is pushed to the far right of the screen.
A: Brian, see, the problem is that the script can't get css properties of the object if they are described in separate .css block (or file).
In other words, you can't get the value of "POSITION: absolute" attribute of the object if the object doesn't have this property within inline style (style="POSITION:absolute;"). To get the value you should move .css style into style="" attribute.
Please, try to add your
css file -> inline css, for example:
You should add style="POSITION: absolute;"
to the
<div id="menu">
So, you'll have:
<DIV id="menu" style="POSITION: absolute;">
Q: I have function "confirmLogout()" that it returns true or false. If it is false, the function does not make nothing. If it's true, I need to direct for the page "goout.jsp". How to use this function in the mouseover drop menu?
function confirmLogout() {
if(confirm('It really desires to leave? ?')) {
return true;
} else {
return false;
}
}
A: Actually you can use your own Javascript code instead standard mouseover drop menu links. For example:
var menuItems = [
["text", "javascript:your_code_here"]
];
or
var menuitems = [
["<div onClick='your_code_here'>item text</div>", ""]
];
Q: I have been trying for months to find an answer to my submenu problem using your FAQ and Recent Questions.
The only thing that comes close to an answer is from one of your Recent Questions below, but I don't understand the answer. Will you please give me specific code or info to fix? Please refer to my frameset code and data.js info, which I've provided further down this message.
I am using cross frame menu dropdown. I have three frames: Top, Left and main (middle).
I am using the script and data from your sample file, it works fine. Only problem is submenu is offset to the right. It does not show up exactly down below the top javascript hide menu.
A: Yes, I suppose that the reason is in your frame structure. For examplenow you have:
top -------------------
**MENU**
left--|main------------
|
| **submenus**
|
Try to add additional frame in your top frame with the same width asyour left frame has:
l-top-|right-top-----------------
| **MENU**
left--|main----------------------
|
| **submenus**
|
Q: I need the sub menu to be vertical with the text on top of each other instead of horizontal way as as I have now on my website.
I have tried to change the smWidth & smHeight in the Dimension category but it shows no changes.
A: Please, see menu parameters.
You should set this parameter:
var smOrientation=0;