Rad window Anchor tags don't work

4 posts, 0 answers
  1. A K
    A K avatar
    49 posts
    Member since:
    Apr 2010

    Posted 21 May 2010 Link to this post

    I have following radwindow defined on master page.

    I try to open a page with anchor tags but it’s not working. But when I open page in the browser Anchor tags work fine.

     

    Rad window:

    <telerik:RadWindow ID="radWINDialogPostLogin" runat="server" Behavior="Close" ReloadOnShow="false"

                            Left="" VisibleTitlebar="True" Style="display: none;" Top="" Modal="False" Behaviors="Close,Move,Resize">

                      </telerik:RadWindow>

  2. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 25 May 2010 Link to this post

    Hi,

    There was such a problem with previous RadWindow versions, but it is already fixed and everything is fine in the latest version. Please download our latest RadWindow for ASP.NET AJAX version.

    I tested the following code with the latest DLL and everything works as expected:
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div>
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Sitefinity">
                <Windows>
                    <telerik:RadWindow ID="radWINDialogPostLogin" runat="server" Behavior="Close" ReloadOnShow="false"
                        Left="" VisibleTitlebar="True" Top="" Modal="False" Behaviors="Close,Move,Resize"
                        VisibleOnPageLoad="true" Width="1000px" Height="800px"
                        NavigateUrl="http://www.w3.org/standards/semanticweb/ontology.html#examples">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>
        </div>
        </form>
    </body>
    </html>

    I also tested anchors on the following online example and everything works as expected:
    http://demos.telerik.com/aspnet-ajax/window/examples/radwindowobject/defaultcs.aspx
    In the example above, you can change the value in the "url input" with the following url: http://www.w3.org/standards/semanticweb/ontology.html#examples
    and press "Set New URL" button. Once the page is loaded in the RadWindow, you can click over one of the "what is a vocabulary, what are vocabularies used for, examples and learn more" links.


    Best wishes,
    Petio Petkov
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Juan Fernando
    Juan Fernando avatar
    2 posts
    Member since:
    Aug 2011

    Posted 20 Jun 2014 in reply to Petio Petkov Link to this post

    Hi, I just checked, and It still does not work properly, because it loads the page given, but only once. If you try to set  the URL again, it will load forever.

    Thanks in advance
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 24 Jun 2014 Link to this post

    Hi Juan,

    On my end the page loads fine and anchors are respected by the browser.

    The potential problem is that you can see a loading sign because the setUrl() method was called. It shows the loading signs and they are hidden in the iframe's onload event. It is not fired by the browser, however, when the hash is changed:

    <asp:Button ID="Button3" Text="set same url again" OnClientClick="setSameUrl();
                return false;" runat="server" />
    <asp:Button ID="Button2" Text="set new url" OnClientClick="setNewUrl();
                return false;" runat="server" />
    <iframe onload="alert(1);" id="testFrame" src="http://www.w3.org/standards/semanticweb/ontology.html#examples">
    </iframe>
    <script type="text/javascript">
        function setSameUrl() {
            var frame = document.getElementById("testFrame");
            frame.setAttribute("src", "http://www.w3.org/standards/semanticweb/ontology.html#examples");
        }
        function setNewUrl() {
            var frame = document.getElementById("testFrame");
            frame.setAttribute("src", "http://www.w3.org/standards/semanticweb/ontology.html#uses");
        }
    </script>

    Thus, you may need to hide the loading sign manually:

    <asp:Button ID="Button1" Text="show Wnd" OnClientClick="showWnd();
       return false;" runat="server" />
    <asp:Button ID="Button3" Text="set same url again" OnClientClick="setSameUrl();           
       return false;" runat="server" />
    <asp:Button ID="Button2" Text="set new url" OnClientClick="setNewUrl();
       return false;" runat="server" />
    <telerik:RadWindow ID="radWINDialogPostLogin" runat="server" Behavior="Close" ReloadOnShow="false"
                       Left="" VisibleTitlebar="True" Top="" Modal="False" Behaviors="Close,Move,Resize"
                       Width="1000px" Height="800px"
                       NavigateUrl="http://www.w3.org/standards/semanticweb/ontology.html#examples">
    </telerik:RadWindow>
    <script type="text/javascript">
        function setSameUrl() {
            var wnd = $find("<%=radWINDialogPostLogin.ClientID %>");
            wnd.show();//make sure it is shown
            wnd.setUrl("http://www.w3.org/standards/semanticweb/ontology.html#examples");
            wnd._onWindowUrlChanged();
        }
        function setNewUrl() {
            var wnd = $find("<%=radWINDialogPostLogin.ClientID %>");
            wnd.show(); //make sure it is shown
            wnd.setUrl("http://www.w3.org/standards/semanticweb/ontology.html#uses");
            wnd._onWindowUrlChanged();
        }
        function showWnd() {
            var wnd = $find("<%=radWINDialogPostLogin.ClientID %>");
            wnd.show();
        }
    </script>



    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top