I don't know why my code below doesn't save the response but sends a message to the client.
Code: Select all
if(window.location.href.indexOf("admin_ticket.php?track") > -1)
{
var timeleft = 100;
var downloadTimer = setInterval(function(){
if(timeleft <= 0){
clearInterval(downloadTimer);
}
if(timeleft == 0){
$('input[name="save_reply"]').on("click", function(){
$('form[name="form1"]').submit();
});
$('input[name="save_reply"]').trigger("click");
}
timeleft -= 1;
}, 1000);
}