function update(id, flag) {
var flag_count = jQuery(flag + id).html();
flag_count++;
jQuery(flag + id).html(flag_count);
jQuery.ajax({
url: 'update_count.php',
type: 'post',
data: {
type: flag,
id: id
},
success: function(result) {
}
})
}
How to pass parameters in data but flag and id are arguments of the function.
How to write this?
data:'type='+flag+'&id='+id
Pls help...