PDA

View Full Version : [CLOSED] Remove InputMask dynamically on the client



MTSI
Oct 22, 2013, 6:43 AM
Hi,

I need to remove or disable the InputMask dynamically. I tried inputmask.disable() and inputmask.unmask(). But it was not working.

Thanks in advance.

Daniil
Oct 22, 2013, 9:42 AM
Hi @MTSI,

A disable call appears to be working for me.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:TextField ID="TextField1" runat="server" Note="(999) 999-9999" FieldLabel="Phone">
<Plugins>
<ext:InputMask runat="server" Mask="(999) 999-9999" />
</Plugins>
</ext:TextField>

<ext:Button runat="server" Text="inputMask.disable()" Handler="App.TextField1.inputMask.disable();" />
</form>
</body>
</html>


Though you might need to call this after disabling an inputMask.

App.TextField1.validate();