Forums

add onmousedown to button

keske 30 Jun, 2014
Hello,

My SEO-guru asks me if I can add a onmousedown fuctionto the button in a form. How can I do that?

Thanks a lot.
GreyHead 30 Jun, 2014
Hi keske,

Do you want to check onMouseDown or so you want to check when the form is actually submitted? If you check onMouseDown then you may get several responses if there are validation errors on the form.

You can check onMouseDown using the MooTools
addEvent('mousedown', function() { . . . });


If you want to check for successful submission then you can link a function to the onSuccess option in the validation code. A bit more in this FAQ

Bob
keske 30 Jun, 2014
Hi Bob,

Thank you very much, I'm testing it at the moment. I think i have it working ;-)

Thx for your quick response.
This topic is locked and no more replies can be posted.