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

    I want to add a javascript link with onclick event to the vertical drop down 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 vertical drop down menu?

I want to add a javascript link in the vertical drop down 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 vertical drop down 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. free website builder | creador de paginas web | top website builder | free icon maker | jquery slideshow