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

    How to call javascript function when the user click on a web drop down menu Items...

Return to Recent Questions


Q: Very interested in your product, I want to know, before buy, if it is possible to call javascript function when the user click on a [lw] Items?

You have this example, but I want the possibility to call a javascript function in the client side :

var menuItems = [
[text, "javascript:alert('Hello, world!')", icon1, icon2],
];

Is it possible, if yes could you give the sample?

Thank you for the answer.


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

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

Unfortunately, you can't assign onmouseover/onClick event to each web 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"]
];

Unfortunately we don't have such example.





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 builder | html website maker | best website maker | bootstrap popup