here is my code
<script>
function undKet(nik){
var action = "nik=" + nik;
$.ajax({
cache: true,
url:'und_ket.php',
type:'get',
dataType:'html',
data: action,
error: function() {
alert("Gagal mengirim data!");
},
success:function(data)
{
var _html= $(data);
//do some thing with html eg: _html.find('div').addClass('red')
alert("Data berhasil di kembalikan");
parent.location.reload(true);
}
});
}
</script>
It always run error function, I tried remove dataType but it doesn't work. I need help with that code. Thank You