Error in opening rad window

3 posts, 0 answers
  1. Pankaj
    Pankaj avatar
    24 posts
    Member since:
    Apr 2013

    Posted 10 Oct 2013 Link to this post

    Hi telerik team,

    I am using telerik
    Version=2011.1.426.35
    

    and got the error in IE9 or 10 can you provide any fix for this ASAP 


    The code which i am using is--

    </a><span><a href="javascript:;" onclick="return OpenWindow(0);">Request Demo</a>
    </a><span><a href="javascript:;" onclick="return OpenWindow(1);">Watch vedio</a>

    <telerik:RadWindowManager Behaviors="Close" ID="RadWindowManager" runat="server"
            VisibleStatusbar="false" VisibleOnPageLoad="false">
            <Windows>
                <telerik:RadWindow ID="winRequestDemo" VisibleOnPageLoad="false" Title="Request a Demo or more Information"
                    NavigateUrl="~/PopupRequestDemo.aspx" runat="server" Width="850px" Height="640px"
                    Modal="true" ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="winPopupVideoPlayer" VisibleOnPageLoad="false" Title="Product Video"
                    NavigateUrl="~/PopupVideoPlayer.aspx" runat="server" Width="600px" Height="575px"
                    Modal="true" ReloadOnShow="true">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>


    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script language="javascript" type="text/javascript">
                function OpenWindow(windowIndex) {
                    //get the current windows collection
                    var manager = $find("<%=RadWindowManager.ClientID %>");
                    var windows = manager.get_windows();
                    var win = windows[windowIndex];

                    if (!win.isVisible()) {
                        win.show();
                        win.center();
                    }
                    return false;
                }
            </script>
        </telerik:RadCodeBlock>

    Thanks
    Pankaj
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 11 Oct 2013 Link to this post

    Hello,

    First, posting several threads only makes communication scattered and difficult to follow, so I would advise posting all available information in one place. This thread, for example. Sharing the exact error here would also have helped.

    Now, on the exact matter at hand - I strongly advise that you upgrade to the latest version (Q2 2013 SP1 at present, with Q3 2013 just around the corner) to get support for modern browsers.
    If this is not an option you can consider the X-UA Compatible meta tag to force IE into IE8 mode.

    Also, I would suggest simply using the radopen() method to open your popups instead of accessing members from the windows collection: http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html.

    The correct href attribute to preven browser action on anchors is javascript:void(0);

    Here is the code that I tried and works fine for me under IE9 with the nearest official release, right after version you pointed to (it cannot support IE10). Q1 2011 SP2 (2011.1.519) is that release and your version seems to be an internal build I advise you drop in favor of the official release.

    <a href="javascript:;" onclick="return OpenWindow('winRequestDemo');">Request Demo</a>
    <a href="javascript:;" onclick="return OpenWindow('winPopupVideoPlayer');">Watch vedio</a>
    <telerik:RadWindowManager Behaviors="Close" ID="RadWindowManager" runat="server"
        VisibleStatusbar="false" VisibleOnPageLoad="false">
        <Windows>
            <telerik:RadWindow ID="winRequestDemo" VisibleOnPageLoad="false" Title="Request a Demo or more Information"
                NavigateUrl="~/PopupRequestDemo.aspx" runat="server" Width="850px" Height="640px"
                Modal="true" ReloadOnShow="true">
            </telerik:RadWindow>
            <telerik:RadWindow ID="winPopupVideoPlayer" VisibleOnPageLoad="false" Title="Product Video"
                NavigateUrl="~/PopupVideoPlayer.aspx" runat="server" Width="600px" Height="575px"
                Modal="true" ReloadOnShow="true">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script language="javascript" type="text/javascript">
            function OpenWindow(wndName)
            {
                radopen(null, wndName);
                return false;
            }
        </script>
    </telerik:RadCodeBlock>


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pankaj
    Pankaj avatar
    24 posts
    Member since:
    Apr 2013

    Posted 23 Oct 2013 Link to this post

    Hi Marin Bratanov,

    It didn't work for me :P

    thanks
Back to Top