I am using a button to submit a form with ajax..all works fine..But I need to check if the button is clicked in server side page..How to do it??Any help appreciated..Thanks..
<form>
some values
</form>
<input type="button" name="delete" id="delete" value="Delete"/><br/>
<input type="button" name="edit" id="edit" value="Edit"/><br/>
Script
$("#edit").click(function(event) {
event.preventDefault();
$("#form1").submit()
});
$("#form1").validate({
debug: false,
rules: {
plid:"required",
},
messages: {
plid: "Please select a pack name id..",
},
submitHandler: function(form) {
$.ajax
({
type: "POST",
url: "aanew.php",
data: $('#form1').serialize(),
cache: false,
success: function(response) {
$('#result1').html(response);
}
});
}
});
I want to carry any attribute to check if my button is set... Thanks again..
The form value passes successfully, but I need to check the button status in another page..