+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Aw, Snap! Google Chrome and RadWindow

Aw, Snap! Google Chrome and RadWindow

2 posts, 0 answered
  1. Tristan
    Tristan avatar
    22 posts
    Registered:
    30 Mar 2009
    16 Nov 2010
    Link to this post
    Hello,

    We are using the Telerik Controls within Sitefinity and are currently getting an Aw, Snap Error from Google Chrome anytime we are posting back and triggering a close of the RadWindow. If we are to close the RadWindow purely from JavaScript without postback everything works as expected... It is only when we trigger the close after a postback that it occurs. The function works in all other browsers I have tried, it only fails in Chrome. See the code below for how we have implemented our dialogs.

    We are using Sitefinity 3.7 (Telerik.Web.UI.dll 2010.1.309.35)

    Does anyone have any ideas?

    Thank you.

    protected void TriggerReturnToParent()
    {
        //Wizard End... Close Window
        String strEndWizardClientScript = " if(window.attachEvent) \n" +
            "{ \n" +
            "   window.attachEvent(\"onload\", function() { returnToParent(); }); \n" +
            "} \n" +
            "else if(window.addEventListener) \n" +
            "{ \n" +
            "   window.addEventListener(\"load\", function() { returnToParent(); },false); \n" +
            "} \n";
        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "AddEditMediaWizard_returnToParent", strEndWizardClientScript, true);
    }
     
    //Register Scripts
    protected void RegisterClientScripts()
    {
        //Register All RAD Window Scripts For Closure and Returning Values Back to Parent etc...
        string strClientScripts = " function GetRadWindow()\n" +
            "        {\n" +
            "            var objWindow = null;\n" +
            "            if (window.radWindow) objWindow = window.radWindow;\n" +
            "            else if (window.frameElement.radWindow) objWindow = window.frameElement.radWindow;\n" +
            "            return objWindow;\n" +
            "        }\n" +
            "        function returnToParent()\n" +
            "        {\n" +
            "             var objArgs = new Object();\n" +
            "             objArgs.EditorType = 'AddMediaWizard';\n" +
            "            \n" +
            "            var objWnd = GetRadWindow();\n" +
            "            if(objWnd)\n" +
            "            {\n" +
            "                objWnd.close(objArgs);\n" +
            "            }\n" +
            "        }\n" +
            "        function closeWindow()\n" +
            "        {\n" +
            "            var objWnd = GetRadWindow();\n" +
            "            var objArgs = new Object();\n" +
            "            objArgs.EditorType = 'AddMediaWizard';\n" +
            "            objWnd.close(objArgs);\n" +
            "        }";
        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "AddMediaWizard_ClientScripts", strClientScripts, true);
    }
     
    //Our implementation is a composite control...
    protected override void CreateChildControls()
    {
        base.CreateChildControls();
        RegisterClientScripts();
        if (!Page.IsPostBack)
        {
            //ToDo: BindForm();
        }
    }
    protected void cmdOK_Click(object sender, EventArgs e)
    {
        //ToDo: Save Form Data / Database IO;
        //All Done, Close the Wizard Dialog... Trigger ASync Postback In Parent Window Panel...
        TriggerReturnToParent();
    }


  2. Svetlina Anati
    Svetlina Anati avatar
    2 posts
    Registered:
    24 Sep 2012
    16 Nov 2010
    Link to this post
    Hello Tristan,

     We have seen this problem when a PDF document is loaded and the RadWindow has DestroyOnClose="true". The problem occurred because of the new sandbox feature implemented in the latest versions of Google Chrome to improve security.

    The problem is now fixed in the latest release as shown in our release notes below:

    http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q3-2010-version-2010-3-1109.aspx

    Please, test your scenario with the latest dll and let us know how it goes.

    Regards,
    Svetlina
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
2 posts, 0 answered