html - JavaScript scroll and focus -
in application have displayed records in div set overflow : auto.
task i'am trying accomplish is: after clicking button adding new record database, reload page , if content of div in overflow mode scrool down bottom of div.
also in code behind after adding record can obtain id of control represents new record.
i'am using framework 1.1
steps/tehniques should use accomplish task ?
you can scroll last item function scrollintoview. exemple, if div's id "content" , elements 'p' :
var elements = document.getelementbyid('content').getelementsbytagname('p'); elements[elements.length - 1].scrollintoview();
Comments
Post a Comment