Modified jquery window function
This commit is contained in:
parent
ead768c9df
commit
77419ee709
|
@ -120,11 +120,10 @@ echo "<div style='width:100%'>".html_print_button(
|
||||||
|
|
||||||
init_webchat();
|
init_webchat();
|
||||||
});
|
});
|
||||||
|
$(window).on("beforeunload",function () {
|
||||||
$(window).unload(function () {
|
|
||||||
exit_webchat();
|
exit_webchat();
|
||||||
});
|
});
|
||||||
|
|
||||||
function init_webchat() {
|
function init_webchat() {
|
||||||
send_login_message();
|
send_login_message();
|
||||||
long_polling_check_messages();
|
long_polling_check_messages();
|
||||||
|
@ -305,6 +304,7 @@ echo "<div style='width:100%'>".html_print_button(
|
||||||
data: parameters,
|
data: parameters,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
console.log(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue