Jquery Ajax Post Save Delete Submit
Here is my code
Solution 2:
I use to avoid submit inputs and change by buttons.
<buttontype="button"id="save">SUBMIT</button> //For save
<scripttype="text/javascript">
$("#save").on("click",function (e)
{
});
</script>
So, if anyone deativates javscript form will not submit.
And you can send the data like this:
data: {
foo: 'var'
foo2: 5
},
EDIT. Sorry missunderstood your question. Just control with javascript what button is clicked and assign a value with a hidden field.
Solution 3:
'$("#form").on("submit",function (e)' replace the function with
$("#save").click(function() {
});
$("#delete").click(function() {
});
Post a Comment for "Jquery Ajax Post Save Delete Submit"