» Forums
» DynarchMenu forum
» Support
» javascript actions on nodes
javascript actions on nodes
2008/03/11 14:28
Viewed 914 times
Replies: 0/0

Hi,

I'm trying to get nodes to do something other than just open submenus. Is this possible?

For example, in the example below:
<code>
<ul id="menu">
<li>Item 1</li>
<li>Item 2</li>
<li onclick="alert('test');">
Item 3
<ul >
<li>SubItem 3.1</li>
<li>SubItem 3.2</li>
</ul>
</li>
</ul>
</code>

Clicking on "Link 3" (or rolling over it for electric menu) will open the submenu, but I also want it to do something else.. calling my own handler. However, adding onclick to the <li> does nothing.

Does anyone have a notion of how I might do this?

The reason I'm trying to do this is so that I can transmit the "current" menuitem id to a script that allows the menu to be edited. Currently the script only works for non-node items!

Thanks,
Noel da Costa

Google