This is my script that after changing input value should send it to php file with Ajax.But it's sending the actual value from input field which is set via php.How can i set the new value to be given?
var idg;
var newg;
$('input.readonly').live("click",
function() {
$(this).attr('readonly', false);
idgs=$(this).attr('id');
newg=$(this).attr('value');
$(this).change(function(){
$.ajax({
type:'POST',
url: 'new.php',
data: "idgs="+ idgs +"&newg="+ newg,
success: function(data) { $('.right').html(data); }
});
})
});