Title: execute javascript on button click
Last modified: February 15, 2019

---

# execute javascript on button click

 *  Resolved [Joey George](https://wordpress.org/support/users/csine/)
 * (@csine)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/execute-javascript-on-button-click/)
 * How can I run javascript on submit button field? I tried href = ‘javascript:alert…’
   property, but that does not work.
 * I am trying to use a quick client side way of running reset button using confirm
   box. I know there is a way to use checkbox in the examples, but I would like 
   to use javascript confirm instead. Is there a way to run client side scripts?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Joey George](https://wordpress.org/support/users/csine/)
 * (@csine)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/execute-javascript-on-button-click/#post-11210811)
 * nevermind, the attributes collection has onclick event for what I want to achieve.

Viewing 1 replies (of 1 total)

The topic ‘execute javascript on button click’ is closed to new replies.

 * ![](https://ps.w.org/admin-page-framework/assets/icon-256x256.png?rev=998199)
 * [Admin Page Framework](https://wordpress.org/plugins/admin-page-framework/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-page-framework/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-page-framework/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-page-framework/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-page-framework/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-page-framework/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Joey George](https://wordpress.org/support/users/csine/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/execute-javascript-on-button-click/#post-11210811)
 * Status: resolved