Quantcast
Viewing all articles
Browse latest Browse all 4

Answer by Gurpreet Singh for Catching form submit result

You can trigger your function only when the called function, here "private_payment_send" has returned true. This can be done like this

<form name="multipay_form" onsubmit="if (private_payment_send()) { alert("myFunction") }; return false;">    ...</form>

If you only want to use the jQuery part, you can completely remove the onSubmit attribute and only assign the submit handler using jQuery

jQuery('form[name="multipay_form"]').on('submit', function() {    if (private_payment_send())        alert("myfunction");    return false;});

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>