Title: Can I Call a Java Function from Button?
Last modified: February 9, 2017

---

# Can I Call a Java Function from Button?

 *  Resolved [Amy](https://wordpress.org/support/users/germanpearls/)
 * (@germanpearls)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/can-i-call-a-java-function-from-button/)
 * Can I use the maxbuttons to call a javascript function? If so, how would I call
   it using the shortcode?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * (@basszje)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/can-i-call-a-java-function-from-button/#post-8789679)
 * Hi,
 * Yes you can. In the URL field you can prepend javascript: and then the function
   you want to call:
 * javascript:myFunction();
 * or directly from the shortcode:
 * [maxbutton id=1 url=”javascript:myFunction();”]
 *  Thread Starter [Amy](https://wordpress.org/support/users/germanpearls/)
 * (@germanpearls)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/can-i-call-a-java-function-from-button/#post-8791104)
 * Perfect – thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Can I Call a Java Function from Button?’ is closed to new replies.

 * ![](https://ps.w.org/maxbuttons/assets/icon-128x128.png?rev=1378636)
 * [MaxButtons - Create buttons](https://wordpress.org/plugins/maxbuttons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/maxbuttons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/maxbuttons/)
 * [Active Topics](https://wordpress.org/support/plugin/maxbuttons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/maxbuttons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/maxbuttons/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Amy](https://wordpress.org/support/users/germanpearls/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/can-i-call-a-java-function-from-button/#post-8791104)
 * Status: resolved