1 function WebForm_SaveScrollPositionSubmit() {
2 this.elements['__SCROLLPOSITIONX'].value = WebForm_GetScrollX();
3 this.elements['__SCROLLPOSITIONY'].value = WebForm_GetScrollY();
4 if ((typeof(this.oldSubmit) != "undefined") && (this.oldSubmit != null)) {
5 return this.oldSubmit();
9 function WebForm_SaveScrollPositionOnSubmit() {
10 this.elements['__SCROLLPOSITIONX'].value = WebForm_GetScrollX();
11 this.elements['__SCROLLPOSITIONY'].value = WebForm_GetScrollY();
12 if ((typeof(this.oldOnSubmit) != "undefined") && (this.oldOnSubmit != null)) {
13 return this.oldOnSubmit();
17 function WebForm_RestoreScrollPosition(currForm) {
18 currForm = currForm || theForm;
19 var ScrollX = currForm.elements['__SCROLLPOSITIONX'].value;
20 var ScrollY = currForm.elements['__SCROLLPOSITIONY'].value;
21 if (ScrollX != "" || ScrollY != "")
22 window.scrollTo(ScrollX, ScrollY);
23 if ((typeof(this.oldOnLoad) != "undefined") && (this.oldOnLoad != null)) {
24 return this.oldOnLoad();
28 function WebForm_GetScrollX() {
29 if (window.pageXOffset) {
30 return window.pageXOffset;
32 else if (document.documentElement && document.documentElement.scrollLeft) {
33 return document.documentElement.scrollLeft;
35 else if (document.body) {
36 return document.body.scrollLeft;
40 function WebForm_GetScrollY() {
41 if (window.pageYOffset) {
42 return window.pageYOffset;
44 else if (document.documentElement && document.documentElement.scrollTop) {
45 return document.documentElement.scrollTop;
47 else if (document.body) {
48 return document.body.scrollTop;