onClosing IE resend information

3 posts, 0 answers
  1. Citt
    Citt avatar
    5 posts
    Member since:
    Nov 2008

    Posted 26 May 2009 Link to this post

    Hello,

    I'am use a radwindows an show the radwindows in javascript :

    var oWnd = $find("DialogWindow");
    oWnd.setUrl(rcbox.newUrl);
    oWnd.setSize(380,200);
    oWnd.add_close(OnClientClose);
    oWnd.show();

    when closing the window with the following code, IE resend information
    function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        
        function CloseRad() {
            var oWnd = GetRadWindow();
            oWnd.close();
        }


  2. Citt
    Citt avatar
    5 posts
    Member since:
    Nov 2008

    Posted 26 May 2009 Link to this post

    My Test Projet :

    Default.aspx :
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
            <Windows> 
                <telerik:RadWindow ID="DialogWindow" Behaviors="Close" Modal="true" runat="server" 
                    VisibleStatusbar="false" ReloadOnShow="false"
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
     
        <script> 
        function openWin() { 
            var oWnd = $find("DialogWindow"); 
            oWnd.setUrl('./testwindows.aspx'); 
            oWnd.setSize(380,200);     
            oWnd.add_close(OnClientClose); 
            oWnd.show(); 
        } 
         
        function OnClientClose(oWnd) { 
            alert('closed'); 
        } 
        </script> 
     
        <input type="button" value="Open windows" onclick="openWin();" /> 

    testwindows.aspx
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
         
     
        <script type="text/javascript"
        function GetRadWindow() { 
            var oWindow = null
            if (window.radWindow) oWindow = window.radWindow; 
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
            return oWindow; 
        } 
         
        function CloseRad() { 
            var oWnd = GetRadWindow(); 
            oWnd.close(); 
        } 
        </script> 
         
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
     
            <script type="text/javascript"
                window.onload = function() 
                { 
                    setTimeout( function() { 
                        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad"); 
                    }, 200); 
                } 
            </script> 
     
        </telerik:RadCodeBlock> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <asp:Panel ID="Panel1" runat="server"
            <asp:Panel ID="Panel2" Visible="false" runat="server"
                 
                            <button onclick="javascript: CloseRad();"
            Valider</button> 
                 
            </asp:Panel> 
        </asp:Panel> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
            <table align="center"
                <tr> 
                    <td> 
                        &nbsp; 
                    </td> 
                </tr> 
                <tr> 
                    <td align="center"
                        <img alt="Veuillez patienter ..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading5.gif") %>' 
                            style="border: 0px;" /> 
                    </td> 
                </tr> 
                 
            </table> 
        </telerik:RadAjaxLoadingPanel> 


    testwindows.aspx.cs
    protected void Page_Load(object sender, EventArgs e) 
        string MyTest = ""
     
    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) 
        if (e.Argument == "InitialPageLoad"
        { 
            string MyTest2 = ""
     
            Panel2.Visible = true
        } 



    when closing the window the variable MyTest is reset










  3. Citt
    Citt avatar
    5 posts
    Member since:
    Nov 2008

    Posted 26 May 2009 Link to this post

    the balise <button onclick="javascript: CloseRad();">Valider</button> create a postback
    I'am transform the balise to <input type="button" onclick="javascript: CloseRad();" value="Valider" /> and my problem is resolved !

    thanks !!!
Back to Top