• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5667
  • Last Modified:

Programmatically change scroll position on a div vertical scroll bar

How might I programmatically change the scroll position on a div vertical scroll?
0
codequest
Asked:
codequest
  • 3
1 Solution
 
ZvonkoSystems architectCommented:
The scroll position of a window and of a scrollable area is set by: scrollTop
0
 
ZvonkoSystems architectCommented:
<div id="myDiv" style="width:60px;height:80px;overflow:auto;" onClick="this.scrollTop=900;">
AAAA<br>
BBBB<br>
CCCC<br>
DDDD<br>
EEEE<br>
FFFF<br>
</div>

0
 
codequestAuthor Commented:
That's what I needed.  Thanks!
0
 
ZvonkoSystems architectCommented:
You are welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now