Completed
Last Updated: 21 Jul 2014 07:16 by ADMIN
ADMIN
Danail Vasilev
Created on: 24 Jun 2014 10:26
Category: Button
Type: Bug Report
0
FIX Opening the link of RadButton (ButtonType="LinkButton") with Target="_blank" in new window
 For the time being the following workaround can be used:

ASPX:

       <telerik:RadButton ID="RadButton1" runat="server" Text="Click" NavigateUrl="http://www.google.bg" Target="_blank" ButtonType="LinkButton">
        </telerik:RadButton>
        <script>
            Telerik.Web.UI.Button.NavigationFunctionality.prototype._handleNavigateUrl = function () {
                $ = $telerik.$;
                var that = this,
                    target = that.options.navigateTarget,
                    url = that.options.navigateUrl;

                if (target && target == "_blank")
                    window.open(url);
                if (target && target == "_parent")
                    window.parent.location.href = url;
                if (target && target == "_top")
                    window.parent.location.href = url;
                else if (!target || target == "_self")
                    window.location.href = url;
                else {
                    var targetFrame = $("iframe[name='" + target + "']").get(0)
                                        || $("frame[name='" + target + "']").get(0)
                                        || $("#" + target).get(0);

                    if (targetFrame && targetFrame.tagName.toLowerCase().indexOf("frame") > -1)
                        targetFrame.setAttribute("src", url);
                }
            }
        </script>
1 comment
ADMIN
Joana
Posted on: 21 Jul 2014 07:16
The issue will be fixed in Q2 2014 SP1