Nov 18, 2014, 9:17 AM
Blur is not working for Text Field in ext.net 2.5
Hi ,
Migrated application on ext.net 2.5 from 1.1 .In Breaking changes #117 mentioned that
But requirement was based on text field length , have to set the other text field enable or disable
Below is the code for same
Please suggest ! Thanks in advance.
Migrated application on ext.net 2.5 from 1.1 .In Breaking changes #117 mentioned that
The Text Field Change event is now fired when a user is typing, not just on blur.
Below is the code for same
<ext:TextField ID="txtA" runat="server" FieldLabel="Artifact URL" LabelAlign="Left"
LabelWidth="65" Width="375" EmptyText="Type in the actual path."
MaxLength="500" MaskRe="[^*%<>]">
<Listeners>
<Focus Handler="#{txtB}.setDisabled(false);" />
<Blur Handler="setEnable(this)" />
</Listeners>
</ext:TextField>
<ext:TextField ID="txtB" runat="server" FieldLabel="Text to Display" LabelAlign="Left"
LabelWidth="80" Width="425" EmptyText="Type in the text to display."
MaxLength="80" MaskRe="[^*%<>]" Disabled="true">
</ext:TextField>
and javascript code is as beloe var setEnable = function(url) {
if (url.el.dom.value != "") {
#{txtB}.setDisabled(false);
}
else
{
#{txtB}.el.dom.value = "";
#{txtB}.EmptyText="Type in the text to display.";
#{txtB}.applyEmptyText();
#{txtB}.setDisabled(true);
};
} ;
previously it was working fine but now unable to validate the field .Please suggest ! Thanks in advance.