| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- function WebForm_SaveScrollPositionSubmit() {
- theForm.elements['__SCROLLPOSITIONX'].value = WebForm_GetScrollX();
- theForm.elements['__SCROLLPOSITIONY'].value = WebForm_GetScrollY();
- if ((typeof(this.oldSubmit) != "undefined") && (this.oldSubmit != null)) {
- return this.oldSubmit();
- }
- return true;
- }
- function WebForm_SaveScrollPositionOnSubmit() {
- theForm.elements['__SCROLLPOSITIONX'].value = WebForm_GetScrollX();
- theForm.elements['__SCROLLPOSITIONY'].value = WebForm_GetScrollY();
- if ((typeof(this.oldOnSubmit) != "undefined") && (this.oldOnSubmit != null)) {
- return this.oldOnSubmit();
- }
- return true;
- }
- function WebForm_RestoreScrollPosition() {
- window.scrollTo(theForm.elements['__SCROLLPOSITIONX'].value, theForm.elements['__SCROLLPOSITIONY'].value);
- if ((typeof(theForm.oldOnLoad) != "undefined") && (theForm.oldOnLoad != null)) {
- return theForm.oldOnLoad();
- }
- return true;
- }
- function WebForm_GetScrollX() {
- if (window.pageXOffset) {
- return window.pageXOffset;
- }
- else if (document.documentElement && document.documentElement.scrollLeft) {
- return document.documentElement.scrollLeft;
- }
- else if (document.body) {
- return document.body.scrollLeft;
- }
- return 0;
- }
- function WebForm_GetScrollY() {
- if (window.pageYOffset) {
- return window.pageYOffset;
- }
- else if (document.documentElement && document.documentElement.scrollTop) {
- return document.documentElement.scrollTop;
- }
- else if (document.body) {
- return document.body.scrollTop;
- }
- return 0;
- }
|