sorry if the answer to this is obvious but I couldn’t find it.
How do I detect if the user has clicked, dragged etc. on an image (or other element)?
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are several way of doing this:
In HTML it would be something like:
In the case of Richfaces you’d probably want to invoke some sort of server side logic through an Ajax request after your image has been clicked, so, the most appropriate thing would be:
For more information of how to add Ajax behavior to standard HTML components tags with Richfaces see the a4j:support component description.