problem with scroll position
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   A_Rowell
Posted On:   Thursday, September 19, 2002 09:12 AM

I'm using JSP with Tomcat/Apache on Linux. I'm using the JSP/XSL(markup)/XML(data) to generate the HTML. I'm using a simple JavaScript reload (part of the HTML file generated) of the JSP to pick up any changes in the XML data. The problem is that the scroll position is not preserved after the reload. I have tried using a scrollTo() after the reload which works in browsers on the Linux platform (NN, Mozilla 5, doesn't have the scroll problem) but not on Windows (IE or NN) which I need to support. If I hardcode scrollTo (400, 400) or some such, I can see the scrollTo happening but then it scrolls back to the top as the reload completes.    More>>

I'm using JSP with Tomcat/Apache on Linux. I'm using the
JSP/XSL(markup)/XML(data) to generate the HTML.



I'm using a simple JavaScript reload (part of the HTML file
generated) of the JSP to pick up any changes in the XML
data. The problem is that the scroll position is not
preserved after the reload.



I have tried using a scrollTo() after the reload which works
in browsers on the Linux platform (NN, Mozilla 5,
doesn't have the scroll problem) but not on Windows (IE or
NN) which I need to support. If I hardcode scrollTo
(400, 400) or some such, I can see the scrollTo
happening but then it scrolls back to the top as the
reload completes.



Any help with this would be appreciated. Does anyone know
why this occurs and/or another way to accomplish what
I'm trying to do? Thanks.


~~A

   <<Less

Re: problem with scroll position

Posted By:   Firat_Tiryaki  
Posted On:   Friday, September 20, 2002 07:28 AM

window.scroll just works with x and y positions


window.scroll(x,y);

e.g. window.scroll(100,100)

Re: problem with scroll position

Posted By:   Firat_Tiryaki  
Posted On:   Friday, September 20, 2002 07:26 AM

use window.scroll method

Re: problem with scroll position

Posted By:   Nitesh_Naveen  
Posted On:   Thursday, September 19, 2002 10:08 AM

try puttin the scrollTo in the body onload. That'll be called once the body is completely loaded. so it should be scrolling to the correct position..
About | Sitemap | Contact