jquery - How to make selected the dropdown value while edit in php -
function student_info(student_id,section,type) { $.ajax({ type:'post', url: "ajax/get_student_info.php", data:'student_id='+student_id+'&type='+type+'§ion='+section, success: function(data){ var value=data.split('@@@'); alert(value); $("#name").val(value[1]); $("#father_name").val(value[2]); alert(value[9]); var trans_id = value[9]; if(value[3]==0) $(".male" ).prop( "checked", true ); else $(".female" ).prop( "checked", true ); $("#area").val(value[5]); $("#address").val(value[6]); $("#roll_no").text(value[7]); $("#mobile_number").val(value[8]); // $("#trans_id").val(value[9]); $("#trans_id").val(trans_id); } }); }
Comments
Post a Comment