My Form is:
<form class="something" id="main-form">
-----content----
My Jquery is:
$("form :input").change(function() {
var data = $('#main-form').serialize();
console.log(data);
$.ajax({
url:"<?php echo Yii::app()->createAbsoluteUrl('jobs/index'); ?>",
//dataType:"json",
type: "POST",
data: $('#main-form').serialize(),
success: function(data){
}
});
});
But the form is not serialized.The data field is coming empty.Please help.