hi guys ,
i have written a code like this. It returns a array of value like Name => 'pradeep',Age=> '23'
i.e data is array
there are form fields like Name and Age. I need to take the values from the data and set it to each form fields how to do this.how to deal with arrays in jquery.
Code:
$("#patient_id").change(function(){
$.post("/diabetes/patient_detail_change.php",{ location:$("#location").val(),doctor:$("#doctor").val(),patient_id:$("#patient_id").val()} ,function(data){
alert(data);
//$("#patient_id").html(data);
});
});
i.e data is array
there are form fields like Name and Age. I need to take the values from the data and set it to each form fields how to do this.how to deal with arrays in jquery.
Comment