Recent Questions Find Javascript In Template Tree
Q: Is there a way to capture user click event just like the one in the javascript menu sliding?
A: Unfortunately, you can't assign onmouseover/onClick/onContextMenu event to each item.
However, you can achieve this by using standard html objects within items, for example:
var menuitems = [
["<div onContextMenu='your_code_here'>item text</div>", ""]
];
Q: You will see I got the first level looking amazing.. this is exactly what I wanted. The interesting thing I figured out was not to use the item border.. this was messing things up. You may notice that when each item highlights.. there is a 1px white line at the separators.. but this is not produced with the item border, but rather from the separator itself which I made in two 1 pixel lines, one blue, on white.. this created that effect.
So now my only problem left is to figure out how to bring this look into the submenus. I was thinking it would be nice to use the separators in the same way throughout the submenus. There does not however seem to be a way to do this. When I tried inserting a separator into a submenu.. nothing happened... I am probably doing this wrong.
Can you please show me how to create the same look I have in the first level in the submenus.. this would be helpful.
I must say, this menu is finally starting to look the way I originally envisioned it. I am very happy. =o)
Thank you so much for all the help you have given me.
A: To add separators in submenus you should write it so:
["|-",] //first level submenus
["||-",] //second level submenus
and so on.
Try that.
Q: We're interested in the pop up menu (context menu) you offered. Is it possible to generate multiple context menus at the same page?
Is the context menu also 508 compliant, in other words, keyboard accessible?
A: Yes, you can use as many context menus as you want on the same page.
You should call your data files at first
<script type="text/javascript" src="data-deluxe-menu.js"></script>
<script type="text/javascript" src="data-deluxe-menu1.js"></script>
<img src="deluxe-menu.files/logo_w.gif" onClick="return dm_popup(0, 1000, event);" style="cursor: pointer;"> //1st menu
<img src="deluxe-menu.files/logo_w.gif" onClick="return dm_popup(1, 1000, event);" style="cursor: pointer;"> //2nd menu
You can use keyboard in context menus but you have to click (or hover) the image. And only after your subitems appear you can press "Ctrl+F2" and arrow keys to navigate themenu.
But if you have multiple menus on one page and use keystrokes support you can navigate only the first menu.
Q: I am having a problem trying to figure out how to generate a link to javascript popup window.
A: You can show the popup window when you hover, click or mouseout on some elements on yourpage.
For example you've added an image in your html page.
You should specify the ID for it, for example:
<p><img id="open_popup" border="0" src="images/submenu-bg.gif" width="170" height="29"></p>
In the Deluxe Tuner you should enter 'open_popup' object ID in the onMouseOver,onClick or onMouseOut fields.
Actually you can assign id to any object on your page manually. You should specify ID's - id="xxxx" for <a>, <div>, <img> ... tags.
Or you want to open a popup onMouseover, onClick or onMouseout on a link.
So, you should create a link (you can also use other object) on your page and set id="" for it, for example:
<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
If you want to show the popup when your page loads you should leave these fields empty:
onMouseOver:"",
onMouseOut:"",
onClick:"",