does anyone know how to maintain the users scroll position on DNN pages?
i have pages which have modules "below the horizon" and it's very irritating to have the user returned to the top of the page on updates.
i can see in the default.aspx and default.vb pages that there "something" written which appears to be addressing this. for example, in the aspx page i can see:
<dnn:form id="form" runat="server" ENCTYPE="multipart/form-data" style="height: 100%;" autocomplete="off">
<asp:Label ID="SkinError" runat="server" CssClass="NormalRed" Visible="False"></asp:Label>
<asp:PlaceHolder ID="SkinPlaceHolder" runat="server" />
<input id="ScrollTop" runat="server" name="ScrollTop" type="hidden" />
<input id="__dnnVariable" runat="server" name="__dnnVariable" type="hidden" />
</dnn:form>
and in the vb page there is:
Public Property PageScrollTop() As Integer
Get
If ScrollTop.Value.Length > 0 AndAlso IsNumeric(ScrollTop.Value) Then
Return CInt(ScrollTop.Value)
End If
End Get
Set(ByVal Value As Integer)
ScrollTop.Value = Value.ToString
End Set
End Property
along with some commented out code:
''' <summary>
''' Initialize the Scrolltop html control which controls the open / closed nature of each module
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks>
''' </remarks>
''' <history>
''' [sun1] 1/19/2004 Created
''' [jhenning] 3/23/2005 No longer passing in parameter to __dnn_setScrollTop, instead pulling value from textbox on client
''' </history>
and this:
Public Property PageScrollTop() As Integer
Get
If ScrollTop.Value.Length > 0 AndAlso IsNumeric(ScrollTop.Value) Then
Return CInt(ScrollTop.Value)
End If
End Get
Set(ByVal Value As Integer)
ScrollTop.Value = Value.ToString
End Set
End Property
but it seems the ScrollTop value is always 0
anyone tackled this?