setta un timeout

prova a mettere un timeout

function check_dim() {
var w = window.outerWidth; //oppure innerWidth;
var h = window.outerHeight; //oppure innerHeight;

if (w<1024 || h<768) {
w = (w<1024) ? 1024 : w;
w = (h<768) ? 768 : h;
window.resizeTo(w,h);
}
setTimeout("check_dim",100);
}