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

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

I want to add a javascript link in the windows popup 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 windows popup 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. website builder | bootstrap menu | creer site free | best website builder software | bootstrap forms