| 
      Return to Recent Questions I would like to add a javascript link with onclick event to the html jump menu 
 
 Q:
I would like to add a javascript link but cannot seem to get it
 handle the event as a tag or onclick event.  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?
 
 
 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 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
 
 
 |