on click image input-field

Hi,

I implemented this code
form_.getInput(“form_piva”+tipo).style.backgroundImage = “url(…/image/f1r.jpg)”;
in order to show an image in an input (text) field.

Now, I would like to enable the event “on-click” when the cursor is on the image (not the filed).

Can you help me with this?
Have you got an example I can follow, a part of code, or something similar?

Thank you in advance.
BR,
Claudio

PS. Find attached a snapshot. In the filed you can find a magnifying-lens. I would like to enable the event “on click” when the cursor is on the lens image.

Hello,
I found this solution


var rsoc = form_.getInput(“form_rsoc”+tipo);
if (window.addEventListener) {
rsoc.addEventListener(“dblclick”, function(){ callRicerca(“form_rsoc”+tipo);
}, false);
} else {
rsoc.attachEvent(“dblclick”, function(){ callRicerca(“form_rsoc”+tipo);});
}


it looks ok
Claudio