Files
SSC/CMS_SC/Scripts/BrowserWindowSize.js
T
Samuele E. Locatelli 202af30a9c Versione con aggiunta gestione conteggio chiamate secondo risoluzione
MANCA sia salvataggio su DB (ogni 1000?) che pagina x mostrare numero chiamate...
2018-03-02 17:43:02 +01:00

27 lines
585 B
JavaScript

// Browser windows size collector
window.onresize = function (event) {
SetWidthHeight();
}
function SetWidthHeight() {
var height = $(window).height();
var width = $(window).width();
$.ajax({
url: "../windowSize.ashx",
data: {
'Height': height,
'Width': width
},
contentType: "application/json; charset=utf-8",
dataType: "json"
}).done(function (data) {
if (data.isFirst) {
window.location.reload();
};
}).fail(function (xhr) {
alert("Problem to retrieve browser size.");
});
}
$(function () {
SetWidthHeight();
});