# HG changeset patch # User robcast # Date 1074078413 -3600 # Node ID 21789f3f7251b47e029ee18aa8476eb6b4aaff54 # Parent d6a3b6aaa20317cb72fb721e09608982ce046f05 Corrected Problems with innerWidth and about:blank for Safari. diff -r d6a3b6aaa203 -r 21789f3f7251 client/digitallibrary/digilib.jsp --- a/client/digitallibrary/digilib.jsp Tue Dec 23 17:29:08 2003 +0100 +++ b/client/digitallibrary/digilib.jsp Wed Jan 14 12:06:53 2004 +0100 @@ -103,17 +103,27 @@ function redirect() { - if (document.body) { - - // internet explorer + opera - client = "&dw=" + (document.body.clientWidth-30) + "&dh=" + (document.body.clientHeight-30); + var wwidth, wheight; + if (self.innerHeight) // all except Explorer + { + wwidth = self.innerWidth; + wheight = self.innerHeight; + } + else if (document.documentElement && document.documentElement.clientHeight) + // Explorer 6 Strict Mode + { + wwidth = document.documentElement.clientWidth; + wheight = document.documentElement.clientHeight; + } + else if (document.body) // other Explorers + { + wwidth = document.body.clientWidth; + wheight = document.body.clientHeight; + } - } else { + client = "&dw=" + (wwidth-30) + "&dh=" + (wheight-30); + //alert("CLIENT: "+client); - // mozilla-browsers (netscape 4.xx, netscape 6.xx, etc.) - client = "&dw=" + (innerWidth-30) + "&dh=" + (innerHeight-30); - - } <% if (dlRequest.isRDF()){ String strAllParams=dlRequest.getAsString(); @@ -145,7 +155,7 @@
-