Automatic save draft reply
Posted: Thu Mar 16, 2023 7:45 am
I want wrote jquery script which automatic save draft reply because sometimes when server have some bug or accidentally I close browser I have to write again responde. I think the maybe the same problem have another which use hesk.
I don't know why my code below doesn't save the response but sends a message to the client.
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);
}