I have problem with this code that I can not understand. Window.location
worked perfectly for me before but this time its not and I have no idea. When I access this direction manually - it works, but redirect does not work - just refreshes page. I have no clue what to do !
I've tried to redirect it to google or whatever but it still just refreshes.
$("#remove-form").on("submit", function(event) {
usunRow();
});
function remove() {
var id=document.getElementById("id").innerHTML;
if (id != "ID"){
$('#remove-modal').modal('show');
} else $('#error-modal').modal('show');
}
function usunRow(){
var id=document.getElementById("id").innerHTML;
if (id != "ID"){
window.location.href = "usun.php?id="+id;
alert("usun.php?id="+id);
} else $('#error-modal').modal('show');
}
here's all functions I am using for this