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

RadTextbox is cleared and the error is "javascript :"OnClientClose is not defined""

4 Answers 95 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mounir Maghraoui
Top achievements
Rank 1
Mounir Maghraoui asked on 20 Apr 2010, 06:02 PM
Hi,
I'm using Telerik version 2009.31208.20. I have a master page in which I put some windows in a radwindow manager and an OnClientClose javascript function that is invoked when a window is open then closed in the content page. This scenario works perfectly.
However,
I have placed in the  content page 3 radtextbox (change pass word form),. After entering the  old and new password, I clic on a validate button to send the form and change the password. This works fine in all web navigators except in Google Chrome: some times and at random way, when I clic on the validate button i get the "try to enter your old passwold" and the radtextbox is cleared (an empty string is sent to the server). When I debug javascript in the page, this error is shown: erreur javascript :"OnClientClose is not defined : $create(Telerik.Web.UI.RadWindow, ...get("ctl00_frmCoordonneesPostale"));".
Thanks.
here the master page source code:
 <telerik:RadWindowManager ID="RadWindowManager1" Skin="WebBlue" runat="server" Behaviors="Close, Move" 
        Modal="True" ReloadOnShow="True" ShowContentDuringLoad="False" OnClientClose="OnClientClose" 
        InitialBehaviors="Close"
        <Windows> 
            <telerik:RadWindow ID="frmCoordonneesPostale" runat="server" Title="<%$ Resources:Labels, SubSpacefrmCoordonneesPostaleTitle %>" 
                DestroyOnClose="False" Height="510px" KeepInScreenBounds="True" VisibleStatusbar="false" 
                Width="575px" ReloadOnShow="true" ShowContentDuringLoad="false" Animation="FlyIn" OnClientClose="OnClientClose" /> 
            <telerik:RadWindow ID="frmMsg" runat="server" Title="<%$ Resources:Labels, SubSpacefrmMsgTitle %>" 
                DestroyOnClose="False" Height="534px" KeepInScreenBounds="True" VisibleStatusbar="false" OnClientClose="OnClientClose" 
                Width="575px" ReloadOnShow="true" ShowContentDuringLoad="false" Animation="FlyIn" /> 
            <telerik:RadWindow ID="frmConfirmRegister" runat="server" Title="confimation" DestroyOnClose="False" Height="200px" KeepInScreenBounds="True" VisibleStatusbar="false" OnClientClose="OnClientClose" 
                    Width="570px" ReloadOnShow="true" ShowContentDuringLoad="false" Animation="FlyIn" /> 
        </Windows> 
    </telerik:RadWindowManager> 
<script type="text/javascript"
 function OnClientClose(radWindow) { 
            if (radWindow.Argument != null & radWindow.Argument == 'ConfirmMessage') { 
                radWindow.Argument = null
                if (radWindow._name == 'frmCoordonneesPostale') { 
                    $find("<%= RadToolTip1.ClientID %>").show();                     
                    return; 
                } 
                if (radWindow._name == 'frmMsg') { 
                    $find("<%= RadToolTip2.ClientID %>").show(); 
                    return; 
                } 
            } 
            if (radWindow._name == 'frmConfirmRegister') { 
                document.location.href = "login.aspx";  
            } 
        } 
............... 
 </script> 
 

Here the content page source code (change password form):
<asp:UpdatePanel runat="Server" ID="UpdatePanel1"
                        <ContentTemplate>
                                    <table cellspacing="2" cellpadding="2" border="0" width="100%" style="position: relative; 
                                left: 21px; z-index: 1000;"> 
                                <tr> 
                                    <td colspan="2"
                                        <span class="repliB" id="ChangePwd"><span class="changePassword" onclick="cacherMontrerB('ChangePwdContent','ChangePwd')"
                                            <img src="Images/pixel.gif" width="13" height="13" alt="puce" class="puceTriangleB" 
                                                style="cursor: pointer" /> 
                                            <asp:Label ID="lbChangePassword" runat="server" Style="cursor: pointer"><% =Resources.Labels.SubSpaceTdChangePassword%></asp:Label> 
                                        </span><span id="ChangePwdContent" class="listeCache listeItems"
                                            <table id="tblChangePwdDefaultMessage" runat="server" Visible="True" cellspacing="2" cellpadding="2" border="0" width="90%" style="padding-left: 22px"
                                            <tr style="vertical-align: text-top;height: 70px"
                                                    <td colspan="2" style="text-align: right"
                                                        <asp:Label runat="server" ID="MsgInfoDefaultModifPwd" Text="<%$ Resources:Labels, MsgInfoDefaultModifPwd %>" CssClass="MsgInfoDefaultModifPwd"/> 
                                                    </td> 
                                            </tr> 
                                            </table>        
                                            <table cellspacing="2" cellpadding="2" border="0" width="90%" style="padding-left: 22px"
                                                <tr style="vertical-align: text-top"
                                                    <td style="text-align: right"
                                                        <span class="classTitleMember"
                                                            <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Labels, SubSpaceTdTapeOldPassword %>"></asp:Label></span
                                                    </td> 
                                                    <td style="text-align: right"
                                                        <telerik:RadTextBox ID="tbxOldPwd" runat="server" ValidationGroup="ChangePassword" 
                                                            CssClass="classTbx" Skin="WebBlue" TextMode="Password" Width="160px"
                                                        </telerik:RadTextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr style="vertical-align: text-top"
                                                    <td style="text-align: right"
                                                        <asp:Label ID="Label9" CssClass="classTitleMember" runat="server" Text="<%$ Resources:Labels, SubSpaceTdTapeNewPassword %>"></asp:Label> 
                                                    </td> 
                                                    <td style="text-align: right"
                                                        <telerik:RadTextBox ID="tbxNewPwd" runat="server" CssClass="classTbx" Skin="WebBlue" 
                                                            ValidationGroup="ChangePassword" TextMode="Password" Width="160px"
                                                        </telerik:RadTextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr style="vertical-align: text-top"
                                                    <td style="text-align: right"
                                                        <asp:Label ID="Label2" CssClass="classTitleMember" runat="server" Text="<%$ Resources:Labels, SubSpaceTdConfirmPassword %>"></asp:Label> 
                                                    </td> 
                                                    <td style="text-align: right"
                                                        <telerik:RadTextBox ID="tbxConfirmNewPwd" runat="server" CssClass="classTbx" Skin="WebBlue" 
                                                            ValidationGroup="ChangePassword" TextMode="Password" Width="160px"
                                                        </telerik:RadTextBox> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                            <table cellspacing="2" cellpadding="2" border="0" width="90%" style="padding-left: 22px">                                                 
                                                <tr style="vertical-align: text-top"
                                                    <td style="text-align: right"
                                                    </td> 
                                                    <td style="text-align: right"
                                                        <asp:Button UseSubmitBehavior="false" CssClass="classebouton" ID="btnChangePassword" runat="server" Text="<%$ Resources:Labels, SubSpacebtnValidate %>" 
                                                           OnClick="btnChangePassword_Click" Width="165px" ValidationGroup="ChangePassword"
                                                        </asp:Button> 
                                                    </td> 
                                                </tr> 
</table>
............ 
  </ContentTemplate> 
  </asp:UpdatePanel> 


4 Answers, 1 is accepted

Sort by
0
Mounir Maghraoui
Top achievements
Rank 1
answered on 21 Apr 2010, 12:03 PM
Now, I tried to log in my website using FireFox, the same problem, described above, occurs only when I try to log in at the first time (I have the error message like I didn't enter anything in the login form).
I noticed that this problem is reproducible if Telerik is not installed on the machine - from which I open the website. 
Will have to install anything on the server so that this problem does not return? " OR should I install Telerik to open an online website that uses Telerik?
0
Georgi Tunev
Telerik team
answered on 23 Apr 2010, 11:02 AM
Hi Mounir,

Your code looks OK and at this point I cannot tell what the reason for the problem might be. Please try isolating this issue in a small sample project and send it to us in a support ticket. We will check it and do our best to help.


Regards,
Georgi Tunev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Phil
Top achievements
Rank 1
answered on 02 Jun 2011, 08:24 PM
Has this issue been resolved? I am having a similar issue with a RadTextBox
0
Georgi Tunev
Telerik team
answered on 03 Jun 2011, 12:09 PM
Hi Phil,

We haven't received a reproduction sample for this case and no one else reported such problem, so at this point I cannot tell what the reason was. If you can send me such sample, that I can run locally and reproduce the error, I will check it right away.


Kind regards,
Georgi Tunev
the Telerik team

Browse the vast support resources we have to jump start 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.

Tags
Window
Asked by
Mounir Maghraoui
Top achievements
Rank 1
Answers by
Mounir Maghraoui
Top achievements
Rank 1
Georgi Tunev
Telerik team
Phil
Top achievements
Rank 1
Share this question
or