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

    I want to add a javascript link with onclick event to the drop down menu templates

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 drop down menu templates?

I want to add a javascript link in the drop down menu templates 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 drop down menu templates 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

Copyright (c) 2012, DHTML-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. parallax scrolling | bootstrap image gallery | easy website builder | top web builder | jquery slideshow