When your button clicked and an item selected call this selected item's focus() method. this will cause auto scroll to your element :
Code:
<div style="height:80px; overflow:auto;">
<input type="text" id="id1"><br><br>
<input type="text" id="id2"><br><br>
<input type="text" id="id3"><br><br>
<input type="text" id="id4"><br><br>
<input type="text" id="id5"><br><br>
<input type="text" id="id6"><br><br>
</div>
<input type="button" onclick="document.getElementById('id6').focus();">
OR
when you want to scroll to a particular item, execute the following JavaScript code:
Code:
location.hash = itemID;
...where itemID is a variable that contains the ID of the element you want to scroll to.
Bookmarks