Maintain scroll
```javascript
<script type="text/javascript">
var scrollTop;
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function BeginRequestHandler(sender, args)
{
var elem = document.getElementById('leftBar');
scrollTop=elem.scrollTop;
var status = document.getElementById('serverStatus');
status.style.visibility='visible';
}
function EndRequestHandler(sender, args)
{
var elem = document.getElementById('leftBar');
elem.scrollTop = scrollTop;
var status = document.getElementById('serverStatus');
status.style.visibility='hidden';
}
</script>
```
ASP.NET AJAX: Creating Reusable JavaScript Components (that are not Controls)
http://mattberseth.com/blog/2008/06/aspnet_ajax_creating_reusable.html
Written by Gift
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#