(c) 2007, DHTML-Menu.com
 
   
   
  Support
  Recent Questions
  Write To Support
 

    I want to add a javascript link with onclick event to the dynamic tree menu

Return to Recent Questions


Q: I just want to grab the current page, insert it into a string, and go off to the page it specifies. Can this be done in dynamic tree menu?

I want to add a javascript link in the dynamic tree menu but cannot seem to get it handle the event as a tag or onclick event.


A: You're able to use Javascript calls for each item, for example:

var menuitems = [
["item text", "javascript:your_code_here"]
];

You can't assign onmouseover/onClick event to each dynamic tree menu 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"]
];





Return to Recent Questions

Related:
   
Copyright (c) 2012, DHTML-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. parallax scrolling | gratis website builder | free web editor | Free Bootstrap Template | jQuery Form