Recent Questions Javascript Tree Collapsing Expanding
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: Hi there ... how do I add in the following javascript code so an exit pop doesn't go off:
onClick="exit=false;"
I read this page, but it didn't work
http://deluxe-menu.com/javascript-link-menu-support.html#
A: Unfortunately, you can't assign onmouseover/onClick event to each item. However, you can achieve this by using standard html objects within items, for example:
var menuitems = [
["<div onClick='your_code_here'>item text</div>", "index.html"]
];
Q: It works almost ok BUT without the use of Deluxe Tuner. It seems NOT to be able to provide such results for the creation of popups when a link is clicked (not when a page is loaded). On top of that, what am I supposed to enter in the actions tab in the popup generator?
And what is more, when I click on the 1st link I get a fine sample but when I click on the 2nd one, background colour of the 1st link appears for a about second. How do I get rid of that?
A: > On top of that, what am I supposed to enter in the actions tab in the
> popup generator?
For example you want to open a popup onMouseover, onClick oronMouseout on a link.
So, you should create a link on your page and set id="" for it, forexample:
<a href="javascript:;" id="link">Open popup OnClick</a>
<a href="javascript:;" id="over">Open popup OnMouseover</a>
<a href="javascript:;" id="out">Open popup OnMouseOut</a>
In Deluxe Tuner you should set:
onMouseOver - over
onMouseOut - out
onClick - link
So you'll have
deluxePopupWindow.attachToEvent(win,',,onClick=link,onMouseOver=over,onMouseOut=out,')
See the attached example.
> And what is more, when I click on the 1st link here
> http://www.acting.gr/test.html I get a fine sample but when I click on the
> 2nd one, background colour of the 1st link appears for a about second. How
> do I get rid of that?
You have such effect because you use fade-effect for your popupwindows.
Q: Do I need to replace the menudir/ in the code with the name of the folder I have placed the .js files?
A: Yes, you should change the name of the folder.
If you have, for example such file structure:
deluxe-menu_files/
dmenu.js
data.js
images/
html_pages/
page1.html
page2.html
index.html
So, you should install your menu in the following way:
<head>
<!-- JavaScript Tree Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "deluxe-menu_files/";</script>
<script type="text/javascript" src="deluxe-menu_files/dmenu.js"></script>
<!-- (c) 2006, http://deluxe-menu.com -->
</head>
<body>
<script type="text/javascript" src="deluxe-menu_files/data.js"></script>
</body>
</span>