16. May 2013
Asp.Net , C#
Microsoft provides an property for pages " maintainScrollPositionOnPostBack". If this is set to true it works fine in Internet Explorer browser. But maintainScrollPositionOnPostBack="true" doesn't work in webkit browsers correctly.
$("input[id$='myHiddenFieldIdForMaintainingScrollPosition']").val("keep the value");
Later this position is maintained using the window.onload( ) method. window.onload( ) is executed everytime page/document is loaded into browsers. No matter whether it is MS IE or webkit browser.
var usersYaxisPositionWas = $("input[id$='myHiddenFieldIdForMaintainingScrollPosition']").val();
This value is then used to maintain the position from window.onload( )