Skip to content Skip to sidebar Skip to footer

Attach Function To Left-click On Item

In my firefox addon I have a . I want to be able to work a javascript function when I left-click on an item in the box. The function should retrieve the item's tex

Solution 1:

You need to define a variable named listbox...

var listbox

...and then you need to assign it a reference to a DOM element...

var listbox = document.getElementById("listbox");

...for example.

Don't rely on some browsers adding id attributes to the window object.

Post a Comment for "Attach Function To Left-click On Item"