Hi.
I'm testing out the .NET 4.0 classes and I'm running into a JavaScript error. I have a RadWindow that is hosting controls (not a url) and I have a RadMaskedTextbox with a phone number mask along with other standard TextBoxes inside the RadWindow. I have attached a RequiredFieldValidator to the RadMaskedTextBox and any field that I click or tab off of that has a validator attached will throw an "undefined" JavaScript error. If I remove the validator from the RadMaskedTextBox, all fields and validation work fine even when I tab off of a field. This only happens in a RadWindow and all works fine if all the fields (including the RadMaskedTextBox) are just on the page. Is this a bug with the RadWindow and the RadMaskedTextBox?
Thanks,
Ed
I'm testing out the .NET 4.0 classes and I'm running into a JavaScript error. I have a RadWindow that is hosting controls (not a url) and I have a RadMaskedTextbox with a phone number mask along with other standard TextBoxes inside the RadWindow. I have attached a RequiredFieldValidator to the RadMaskedTextBox and any field that I click or tab off of that has a validator attached will throw an "undefined" JavaScript error. If I remove the validator from the RadMaskedTextBox, all fields and validation work fine even when I tab off of a field. This only happens in a RadWindow and all works fine if all the fields (including the RadMaskedTextBox) are just on the page. Is this a bug with the RadWindow and the RadMaskedTextBox?
Thanks,
Ed
2 Answers, 1 is accepted
0
Hi Ed,
I am not able to replicate the issue. Please check the attached sample and let me know how to alter it so that the problem becomes evident.
Regards,
Pavel
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.
I am not able to replicate the issue. Please check the attached sample and let me know how to alter it so that the problem becomes evident.
Regards,
Pavel
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
FaSSt2001
Top achievements
Rank 1
answered on 20 Apr 2010, 12:40 AM
Hi.
Thank you for your reply. It looks like it was fixed with the latest dll that was included in your project. I was using the 2010.1.413.40 dll. I wasn't able to duplicate the error with your code or my code and the newer dll, but here is my test code that caused the error with the older dll. It happens whether the RadWindow is by itself or within a RadWindowManager. You may just want to try it with the older dll and with the new one to make sure it is fixed. Also, you may find something in my code that was causing it to act weird. Let me know if you find anything. I'll download the newest dll and do some more tests also to make sure it is fixed.
Thanks,
Ed
Thank you for your reply. It looks like it was fixed with the latest dll that was included in your project. I was using the 2010.1.413.40 dll. I wasn't able to duplicate the error with your code or my code and the newer dll, but here is my test code that caused the error with the older dll. It happens whether the RadWindow is by itself or within a RadWindowManager. You may just want to try it with the older dll and with the new one to make sure it is fixed. Also, you may find something in my code that was causing it to act weird. Let me know if you find anything. I'll download the newest dll and do some more tests also to make sure it is fixed.
<telerik:RadWindow ID="rwRegister" runat="server" VisibleOnPageLoad="true" Title="Create Your Account" Behaviors="Close" VisibleStatusbar="false" Overlay="true" AutoSize="true" Modal="true"> |
<ContentTemplate> |
<asp:Panel runat="server" ID="pnlRegisterContainer" CssClass="registercontainer"> |
<div id="registerformcontainer"> |
<fieldset> |
<legend>Account Information</legend> |
<ul style="float: left; clear: left;"> |
<li> |
<asp:Label ID="Label1" runat="server" AssociatedControlID="txtCompany">Company:</asp:Label> |
<asp:TextBox runat="server" ID="txtCompany" /> |
</li> |
<li> |
<asp:Label ID="Label2" runat="server" AssociatedControlID="txtFirstName">First Name:</asp:Label> |
<asp:TextBox runat="server" ID="txtFirstName" /> |
<asp:RequiredFieldValidator ID="valFirstName" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtFirstName" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please enter your first name" /> |
</li> |
<li> |
<asp:Label ID="Label3" runat="server" AssociatedControlID="txtLastName">Last Name:</asp:Label> |
<asp:TextBox runat="server" ID="txtLastName" /> |
<asp:RequiredFieldValidator ID="valLastName" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtLastName" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please enter your last name" /> |
</li> |
<li> |
<asp:Label ID="Label4" runat="server" AssociatedControlID="txtRegistrationPhone">Phone:</asp:Label> |
<telerik:RadMaskedTextBox ID="txtRegistrationPhone" runat="server" SelectionOnFocus="SelectAll" Mask="(###) ###-####" /> |
<asp:RequiredFieldValidator ID="valRegistrationPhone" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtRegistrationPhone" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please enter your phone number" /> |
</li> |
</ul> |
<ul style="float: right; clear: right;"> |
<li> |
<asp:Label ID="Label5" runat="server" AssociatedControlID="txtEmail">Email:</asp:Label> |
<asp:TextBox runat="server" ID="txtEmail" /> |
<asp:RequiredFieldValidator ID="valEmail" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtEmail" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please enter your email address" /> |
<asp:RegularExpressionValidator ID="valEmailReg" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtEmail" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please enter a valid email address" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" /> |
<asp:CompareValidator ID="valCompEmail" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtConfirmEmail" ControlToCompare="txtEmail" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please make sure both email addresses match" /> |
</li> |
<li> |
<asp:Label ID="Label6" runat="server" AssociatedControlID="txtConfirmEmail">Confirm Email:</asp:Label> |
<asp:TextBox runat="server" ID="txtConfirmEmail" /> |
<asp:RequiredFieldValidator ID="valConfirmEmail" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtConfirmEmail" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please enter your email address" /> |
<asp:RegularExpressionValidator ID="valRegConfirmEmail" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtConfirmEmail" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please enter a valid email address" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" /> |
</li> |
<li> |
<asp:Label ID="Label7" runat="server" AssociatedControlID="txtPassword">Password:</asp:Label> |
<asp:TextBox runat="server" ID="txtPassword" TextMode="Password" /> |
<asp:RequiredFieldValidator ID="valPassword" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtPassword" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please enter your a password" /> |
</li> |
<li> |
<asp:Label ID="Label8" runat="server" AssociatedControlID="txtConfirmPassword">Confirm Password:</asp:Label> |
<asp:TextBox runat="server" ID="txtConfirmPassword" TextMode="Password" /> |
<asp:RequiredFieldValidator ID="valConfirmPassword" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtConfirmPassword" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please enter your a password" /> |
<asp:CompareValidator ID="valCompPassword" runat="server" ValidationGroup="RegisterForm" ControlToValidate="txtConfirmPassword" ControlToCompare="txtPassword" Display="Dynamic" SetFocusOnError="true" ForeColor="Teal" Font-Bold="true" Text="*" ErrorMessage="Please make sure your passwords match" /> |
</li> |
</ul> |
</fieldset> |
<div class="left clearleft width50"> |
<fieldset> |
<legend>Billing Address</legend> |
<ul style="float: left; clear: left;"> |
<li> |
<asp:Label ID="Label9" runat="server" AssociatedControlID="txtBillingAddress1">Address 1:</asp:Label> |
<asp:TextBox runat="server" ID="txtBillingAddress1" /> |
</li> |
<li> |
<asp:Label ID="Label10" runat="server" AssociatedControlID="txtBillingAddress2">Address 2:</asp:Label> |
<asp:TextBox runat="server" ID="txtBillingAddress2" /> |
</li> |
<li> |
<asp:Label ID="Label11" runat="server" AssociatedControlID="txtBillingCity">City:</asp:Label> |
<asp:TextBox runat="server" ID="txtBillingCity" /> |
</li> |
<li> |
<asp:Label ID="Label12" runat="server" AssociatedControlID="ddlBillingState">State:</asp:Label> |
<asp:DropDownList runat="server" ID="ddlBillingState" /> |
</li> |
<li> |
<asp:Label ID="Label13" runat="server" AssociatedControlID="txtBillingZip">Zip:</asp:Label> |
<asp:TextBox runat="server" ID="txtBillingZip" /> |
</li> |
</ul> |
</fieldset> |
</div> |
<div class="right clearright width50"> |
<asp:Panel runat="server" ID="pnlRegisterShipping"> |
<fieldset> |
<legend> |
Shipping Address |
<span style="color: Black; font-weight: normal; margin-left: 5px;"> |
<asp:CheckBox runat="server" ID="cbShippingSame" Text="Same as billing?" AutoPostBack="true" /> |
</span> |
</legend> |
<ul style="float: left; clear: left;"> |
<li> |
<asp:Label ID="Label14" runat="server" AssociatedControlID="txtShippingAddress1">Address 1:</asp:Label> |
<asp:TextBox runat="server" ID="txtShippingAddress1" /> |
</li> |
<li> |
<asp:Label ID="Label15" runat="server" AssociatedControlID="txtShippingAddress2">Address 2:</asp:Label> |
<asp:TextBox runat="server" ID="txtShippingAddress2" /> |
</li> |
<li> |
<asp:Label ID="Label16" runat="server" AssociatedControlID="txtShippingCity">City:</asp:Label> |
<asp:TextBox runat="server" ID="txtShippingCity" /> |
</li> |
<li> |
<asp:Label ID="Label17" runat="server" AssociatedControlID="ddlShippingState">State:</asp:Label> |
<asp:DropDownList runat="server" ID="ddlShippingState" /> |
</li> |
<li> |
<asp:Label ID="Label18" runat="server" AssociatedControlID="txtShippingZip">Zip:</asp:Label> |
<asp:TextBox runat="server" ID="txtShippingZip" /> |
</li> |
</ul> |
</fieldset> |
</asp:Panel> |
</div> |
<div id="registerformbuttoncontainer"> |
<asp:Button runat="server" ID="btnRegister" ValidationGroup="RegisterForm" Text="Register" CssClass="button" /> |
</div> |
</div> |
</asp:Panel> |
<asp:Panel runat="server" ID="pnlRegisterComplete" CssClass="registercompletecontainer" Visible="false"> |
<asp:Label runat="server" ID="lblMessage" /> |
</asp:Panel> |
</ContentTemplate> |
</telerik:RadWindow> |
Thanks,
Ed