This is a migrated thread and some comments may be shown as answers.

Use of Anchors in RadPane skips back

1 Answer 23 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 06 Oct 2010, 10:44 PM
When browse to a page with a RadSplitter on it, and the URL contains a #anchor, the page loads and jumps to the anchor correctly, but then it jumps back up to the top.    I see an old, similar thread at http://www.telerik.com/community/forums/aspnet-ajax/splitter/can-t-use-anchor-in-radpane.aspx with no solutions provided.  Is there any way to resolve this behavior without manually managing scroll using javascript?

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 08 Oct 2010, 02:27 PM
Hi Mike,

I am not quite sure I understand the exact problem. Could you please provide more detailed information on the specific scenario?

  • In order to use anchors when loading external page in a pane you need to provide the full path to the href attribute (url and anchor name), e.g.:
    <telerik:RadSplitter ID="RadSplitter1" runat="server">
        <telerik:RadPane ID="RadPane1" runat="server">
            <a href="Default2.aspx?#anchor1" target="<%=RadPane2.ClientID %>">top</a>
            <a href="Default2.aspx?#anchor2" target="<%=RadPane2.ClientID %>">middle</a>
            <a href="Default2.aspx?#anchor3" target="<%=RadPane2.ClientID %>">bottom</a>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane2" runat="server" ContentUrl="Default2.aspx"></telerik:RadPane>
    </telerik:RadSplitter>
  • If you are displaying content from the same page you can simply set the anchor name in the href attribute, e.g.:
        <telerik:RadSplitter ID="RadSplitter2" runat="server">
        <telerik:RadPane ID="RadPane3" runat="server">
            <a href="#anchor1">top</a>
            <a href="#anchor2">middle</a>
            <a href="#anchor3">bottom</a>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane4" runat="server">
            <a name="anchor1">Top of the page</a>
            <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
            <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
            <a name="anchor2">Here's the middle part</a>
            <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
            <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
            <a name="anchor3">and this is the bottom</a>       
        </telerik:RadPane>
    </telerik:RadSplitter>


Kind regards,
Dobromir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Splitter
Asked by
Mike
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or