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

Error in opening rad window

2 Answers 91 Views
Window
This is a migrated thread and some comments may be shown as answers.
Pankaj
Top achievements
Rank 1
Pankaj asked on 10 Oct 2013, 01:29 PM
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 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 11 Oct 2013, 08:40 AM
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.
0
Pankaj
Top achievements
Rank 1
answered on 23 Oct 2013, 09:59 AM
Hi Marin Bratanov,

It didn't work for me :P

thanks
Tags
Window
Asked by
Pankaj
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Pankaj
Top achievements
Rank 1
Share this question
or