I've got this error message :
Uncaught InvalidStateError: Failed to read the 'selectionDirection' property from 'HTMLInputElement': The input element's type ('hidden') does not support selection.
When I check the console, it says error in this code:
function simpan() {
$.ajax({
url: 'app/tblhasilsurvey/simpan',
type: 'post',
async: false,
data: {
cmd: window.cmd,
id: window.id_hasilsurvey,
id_daftar: window.id_daftar,
id_jadwal: window.id_jadwal,
//tblhasilsurvey_nobasurvey : $("#nomor_ba_survey").val(),
nomor_izin : $("#nomor_izin").val(),
tgl_izin : $("#tgl_izin").val(),
pemilik_izin : $("#pemilik_izin").val(),
lokasi : $("#lokasi").val(),
kodekel : $("#kelurahan").val(),
kodekec : $("#kecamatan").val(),
tblhasilsurvey_tglbasurvey : $("#tgl_ba_survey").val(),
tbldaftarrencanasurvey_koordinat : $("#lattitude_").val()+';'+$("#longitude_").val(), // (lattitude;longitude)
tblhasilsurvey_fungsibangunan : $("#fungsi_bangunan").val(),
tblhasilsurvey_uraianpermasalahan : $("#uraian_permasalahan").val(),
tblizin_id : $("#tblizin_id").val()
},
success: function (data) {
if(data=='success') {
notifikasi('Sukses','Data Berhasil Disimpan', 'success');
//window.location.reload();
} else {
notifikasi('Gagal','Data Gagal Disimpan', 'fail');
}
}
});
if( $("#lattitude_").val() !='' ) window.pos_lat = $("#lattitude_").val(); // jika koordinat terisi maka update posisi lattitude
if( $("#longitude_").val() !='' ) window.pos_long = $("#longitude_").val(); // jika koordinat terisi maka update posisi longitude
$("#peta-lokasi").slideDown(1000);
initialize();
$("html, body").animate({ scrollTop: $(document).height() }, 2500);
return false;
function refresh () {
window.location.reload();
}
}
Can someone explain me what happen here?