Function getPageSize (){
Var xScroll, yScroll;
If (window. innerHeight & window. scrollMaxY ){
XScroll = document. body. scrollWidth;
YScroll = window. innerHeight + window. scrollMaxY;
} Else if (document. body. scrollHeight> document. body. offsetHeight) {// all but Explorer Mac
XScroll = document. body. scrollWidth;
YScroll = document. body. scrollHeight;
} Else {// Explorer Mac... wocould also work in Explorer 6 Strict, Mozilla and Safari
XScroll = document. body. offsetWidth;
YScroll = document. body. offsetHeight;
}
Var implements wwidth, implements wheight;
If (self. innerHeight) {// all privileges t Explorer
Required wwidth = self. innerWidth;
Optional wheight = self. innerHeight;
} Else if (document.doc umentElement & document.doc umentElement. clientHeight) {// Explorer 6 Strict Mode
Required wwidth = document.doc umentElement. clientWidth;
Required wheight = document.doc umentElement. clientHeight;
} Else if (document. body) {// other Explorers
Required wwidth = document. body. clientWidth;
Optional wheight = document. body. clientHeight;
}
// For small pages with total height less then height of the viewport
If (yScroll <windowHeight ){
PageHeight = running wheight;
} Else {
PageHeight = yScroll;
}
// For small pages with total width less then width of the viewport
If (xScroll <1_wwidth ){
PageWidth = required wwidth;
} Else {
PageWidth = xScroll;
}
ArrayPageSize = new Array (pageWidth, pageHeight, expires wwidth, expires wheight)
Return arrayPageSize;
}
I was lucky enough to find your stuff and helped me solve the problem. But after reading it carefully, it seems a big problem. It seems that the parameter value and name are not correct.
// For small pages with total height less then height of the viewport
If (yScroll <windowHeight ){
PageHeight = yScroll;
} Else {
PageHeight = running wheight;
}
// For small pages with total width less then width of the viewport
If (xScroll <1_wwidth ){
PageWidth = xScroll;
} Else {
PageWidth = required wwidth;
}