scrolling the page to some position

  • Thread starter Thread starter Abubakar
  • Start date Start date
A

Abubakar

Hi all,

using asp.net in vs2k5. I want to scroll the page (through javascript) to a
position where a specific row of the datalist will become visible to the
viewer. Right now the focus() call of some functionality takes the user to
some area of the page where the row he was working on becomes invisible
(due to scrolling), now after user is done with the work, I want to take the
user back to the row due to which the scroll happened. So now I wanna scroll
back. How is it done, any ideas ? I suspect some calculations in javascript
but I don't know what functions and control properties to use.

thanks,
...ab
 
Abubakar said:
Hi all,

using asp.net in vs2k5. I want to scroll the page (through javascript) to
a position where a specific row of the datalist will become visible to the
viewer. Right now the focus() call of some functionality takes the user to
some area of the page where the row he was working on becomes invisible
(due to scrolling), now after user is done with the work, I want to take
the user back to the row due to which the scroll happened. So now I wanna
scroll back. How is it done, any ideas ? I suspect some calculations in
javascript but I don't know what functions and control properties to use.

thanks,
..ab


Hi,
From Your post i'm not sure if this is appropriate but try putting html
anchors to points where You would like to jump, then set
window.location.hash to jump to any of them.

Hope You find this useful.
-Zsolt
 
Abubakar said:
using asp.net in vs2k5. I want to scroll the page (through javascript) to a
position where a specific row of the datalist will become visible to the
viewer. Right now the focus() call of some functionality takes the user to
some area of the page where the row he was working on becomes invisible
(due to scrolling), now after user is done with the work, I want to take the
user back to the row due to which the scroll happened. So now I wanna scroll
back. How is it done, any ideas ? I suspect some calculations in javascript
but I don't know what functions and control properties to use.

Make a second focus() call to set focus to something within the row he
was working on?
 
Hi all,

using asp.net in vs2k5. I want to scroll the page (through javascript) to a
position where a specific row of the datalist will become visible to the
viewer. Right now the focus() call of some functionality takes the user to
some area of the page where the row he was working on becomes invisible
(due to scrolling), now after user is done with the work, I want to take the
user back to the row due to which the scroll happened. So now I wanna scroll
back. How is it done, any ideas ? I suspect some calculations in javascript
but I don't know what functions and control properties to use.
How do you propose to track the page's position before all this
activity takes place? How is this activity initiated? Considering what
has been described I would consider using anchor tags and navigating
to the tags from within javascript event handlers..

regards
A.G.
 
Registered User said:
How do you propose to track the page's position before all this
activity takes place? How is this activity initiated? Considering what
has been described I would consider using anchor tags and navigating
to the tags from within javascript event handlers..

regards
A.G.

Its like, something is supposed to be edited, and when its clicked, the page
moves up to the fields where the editing takes place and than upon
completion I want the page to move back, with a lil black ">" sign (like in
gmail telling u this is the email that u just read when u come back to the
inbox after reading email) at the start of that line/row.
Since the clicking happens at some row, I will have the row object and that
is how I can track the page's position before this activity takes place.
Anchors is a gud idea and I still havent tried that but I think its going to
work since it can control scrolling.
thanks.
...ab
http://joehacker.blogspot.com
 
Back
Top