javascript - Inserting a button inside a form and triggering different actions in an Angular app -
i'm making web app. i'm in middle of implementing braintree , works fine. have issue view code braintree. below essential view code need braintree integration:
<form name="form" ng-submit="submitpayment()"> <div id="payment-form"></div> <input type="submit" class="button button-form-success button--primary vertical-offset--small" value="pay"> </form>
now, trying add button next pay
button, whenever put button in form, triggers submitpayment()
instead of button's action. how add button inside form , trigger different function when clicked?
just use a tag
below
<a href="" class="button button-form-success button--primary vertical-offset--small">second button</a>
Comments
Post a Comment