Recent Questions
Q: What i need is when the menu item is clicked in the dhtml context menu, it'll run a json the onclick or mouseup event.
Is this possible?
A: You can achieve this by using standard html objects within items, for example:
var menuitems = [
["<div onContextMenu='your_code_here'>item text</div>", ""]
];
Actually you can use any html code within menuItems.
Q: I have been using the trial deluxe menu with the deluxe tuner tocreate a menu and have run into a problem.
The menu is based on the following template:
Vista Styles (Part 2) Vista Style 1.
When I saved the menu file to put into an html file I followedthe instructions on the screen to save all the files to the folderwhere I wanted the menu to appear in an html., and then followedthe instructions to paste the menu into the html file where Iwanted the menu to appear.
It is not working. It seems as though something is left out ofthe code, or perhaps not all the necessary files are being copied.The menu appears perfectly in the deluxe tuner preview screen, butnot when I try to save it and use it elsewhere.
I have included all the files, including the instructions thatcame up when I saved the menu, in the attached zip file and wonderif you might take a look at it and tell me what I am doing wrong and/or leaving out.
Can you help?
A: Your menu works fine.
But you should paste
btn_blue2.gif
btn_blue.gif
into "data-NINnew.files" folder.
Q: How to modify data.js in deluxe menu to change the font color if the user click on css pull down menu.
Expl. If the user click on 'Webdesign' and then on 'Thema Webdesign' the color dosn't change to #333. So the user don't now, where is it. Please test it on www.media-design.ch. Thank!
A: Deluxe Tree 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 dtreet_ext_setPressedItem (menuInd, itemID)
<script type="text/javascript">
var i = <?php echo $selitem; ?>;
onload=setPressed;
function setPressed()
{
dtreet_ext_setPressedItem(0,dtreet_ext_getItemIDByIndex(0, i));
}
</script>
You should define selitem using server side script.
Q: How can I center my navigation java script menu bar within my HTML page? I have tried putting the script into a table that is centered. I have also changed the var menuWidth to 800px. The navigation bar is still right-justified instead of centered in both IE and Firefox/Mozilla.
A: Now you use absolute position for the java script menu bar:
var absolutePos=1;
var posX="0px";
var posY="0px";
You should set:
var absolutePos=0;