Javascript Function Not Working In Form
Hope you all are fine . I have a problem my javascript function is not being called i dont know why I am very confused why the function is not calling I used this same flow in my
Solution 1:
In your onsubmit
attribute, you should just use return checkPriceValidation()
. Try out the code below and see the difference
function submitThis(){
alert('Hi there');
return false;
}
<form onsubmit="return javascript:submitThis()">
<button>This form will be submitted</button>
</form>
<form onsubmit="return submitThis()">
<button>This form will not be submitted</button>
</form>
Post a Comment for "Javascript Function Not Working In Form"