Recent Questions
Q: Hello, I am interesting in purchasing your product, but first I need to know if it is possible to call a JavaScript function from the menu. I have read the FAQ and noted where it lists that you can perform an alert call, and that worked on my end as well, but when I attempted to call a function I created I could not get it to respond. Is it possible to call a function from your menu? Could I get an example?
A: You can write your own functions within menuItems, for example:
["|Real-Time Data Query","javascript:window.open('http://www.domain.org/', '_blank','height=758,width=1024,status=yes,toolbar=no, menubar=no,location=no');",,,'Query real time water quality data' ,'' , '', '', ,],
Q: I activated option "state saving" but I think there's a problem;
when I open the website and click on an item of the menu, the pressed item becomes red
(up to now it's ok), but if I have topress F5 on the keyboard or press on the refresh button
to refresh the web page, the pressed item loses its color red.
I'd like the pressed item in the dhtml expand menu to maintain its color after the refresh command.
How can I solve this problem?
A: Tree Menu doesn't save a presseditem as it saves a tree state.
It works within 1 page only and if youreload the page you should set a pressed item using Javascript API:
function apyt_ext_setPressedItem(menuInd, itemID)
<script type="text/javascript">
var i = 4 //index of the selected item
onload=setPressed;
function setPressed()
{
dtreet_ext_setPressedItem(0,dtreet_ext_getItemIDByIndex(0, i));
}
</script>
Q: Now I need to work out how to add multiple menu's to a page? Are you able to reference these separately - is this possible.
The page that I am creating lists out notes from our system - there is a "options" button to the right of each note - when the cursor hovers over this button I want to dynamically load themenu's. On any page there could be over a 100 of these "option" buttons and the menu that would load from each option button could be different and specific to the note.
A: You can add as many menus as you want on the one page.
You should call
<SCRIPT type=text/javascript> var dmWorkPath = "data.files/";</SCRIPT>
<SCRIPT src="data.files/dmenu.js" type=text/javascript></SCRIPT>
and then call your data files:
<SCRIPT src="data.files/data1.js" type=text/javascript></SCRIPT>
<SCRIPT src="data.files/data2.js" type=text/javascript></SCRIPT>
<SCRIPT src="data.files/data3.js" type=text/javascript></SCRIPT>
<SCRIPT src="data.files/data4.js" type=text/javascript></SCRIPT>
> The page that I am creating lists out notes from our system -
> there is a "options" button to the right of each note - when the
> cursor hovers over this button I want to dynamically load the
> menu's.
You can try to use pop up menus
http://deluxe-menu.com/popup-mode-sample.html
You may also generate a menus from a database or XML using any server-side script, e.g., PHP, ASP, VB, etc.
Q: A brief one on dynamic menu in the perspective of bilinguism
I understood from the tuner that a menu can be made dynamic (although it is somewhat minimally documented ;-))
Leaving alone all the beautiful sophisticated and complex mechanic of it
Say I have my main menu that says :
var dynamic=1; (that's all I got from the doc ..)
And then
var menuItems = [
["Choice 1 ","page1.php", "", "", "Choice 1",", "_self", "", "", "", "", "", ],
["Choice 2","page2.php", "", "", "Choice 2", "_self", "", "", "", "", "", ],
];
Minimalist ? ;-) right ?
1/ first I'm not too sure about what exactly in order are these 11 parameters although I'm fine with the only 4 I have here
2/ if I would want to change on the fly menu javascript dropdown page on a PHP parameter Page1.php?lang=French (I perfectly master how to capture the PHP value)
So that My menu becomes on the fly
["Choix 1 ","page1.php", "", "", "Choix 1",", "_self", "", "", "", "", "", ],
["Choix 2","page2.php", "", "", "Choix 2", "_self", "", "", "", "", "", ],
Thanks in advance if you can shed some light on this
PS : And although I used hardly 1% of deluxe capability my first customer is very happy about it..
A: Actually you can find all info about the menu javascript dropdown parameters and featureson our website:
- menu parameter and items, Individual Styles:
http://deluxe-menu.com/parameters-info.html
http://deluxe-menu.com/menu-items-info.html
http://deluxe-menu.com/individual-item-styles-info.html
http://deluxe-menu.com/individual-submenu-styles-info.html
- dynamic functions:
http://deluxe-menu.com/functions-info.html
http://deluxe-menu.com/dynamic-functions-sample.html
> 2/ if I would want to change on the fly page on a PHP parameter
> Page1.php?lang=French (I perfectly master how to capture the PHP value)
> So that My menu becomes on the fly
> ["Choix 1 ","page1.php", "", "", "Choix 1",", "_self", "", "", "", "", "", ],
> ["Choix 2","page2.php", "", "", "Choix 2", "_self", "", "", "", "", "",> ],
To change the menu items on the fly you can use API functions
function dm_ext_changeItem (menuInd, submenuInd, itemInd, iParams)
function dm_ext_addItem (menuInd, submenuInd, iParams)
function dm_ext_changeItemVisibility (menuInd, submenuInd, itemInd, visibility)