Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...maintaining scroll positionmaintaining scroll position
Previous
 
Next
New Post
9/15/2009 11:35 AM
 

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?

 

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...maintaining scroll positionmaintaining scroll position


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out