Dunque, per conoscere la risoluzione delle schermo nel server uso questo:
nell'evento onload della pagina
nel server recupero h e la memorizzo in variabili di sessionecodice:function window_onload() { var hs = '<%=Trim(CStr(Session("h")))%>'; if(hs == "") { var w = screen.Width; var h = screen.Height; var myImg = new Image(); myImg.src = "a.aspx?w=" + w + "&h=" + h; document.location.reload(); } }
Adesso, con IE tutto ok, con Mozilla, la stampa sullo schermo (PrintLn(Trim(CStr(Session("h"))), "h")) mi restituisce undefined.codice:Dim h$ = Trim(Request.QueryString("h")) If (h <> "") Then Session.Add("h", h) End If If (Trim(CStr(Session("h"))) <> "") Then PrintLn(Trim(CStr(Session("h"))), "h") End If
Ho chiesto qui perchè credo che abbia fatto un errore nel codice client invece che in quello server