Search Results

Search found 3 results on 1 pages for 'maskedinput'.

Page 1/1 | 1 

  • jQuery plugin for formatting inputs

    - by antony.trupe
    I want to accept values in any of the following format: -$5 -$5.00 $5 $5.00 Is it possible to do that using Masked Input Plugin? If not, what plug-in am I looking for? How do I indicate a character is optional? The code I've got so far $.mask.definitions['~']='[ +-]'; $(".currency").mask("~$9");

    Read the article

  • jquery masked input with asp.net control problem

    - by Eyla
    Hi, I have problem while using jquery maskedinput with asp.net textbox. I have a check box that when I check will set a mask to the textbox and when uncheck it change the mask. the problem that when the focus is lost before the mask completed to be filled the text box will empty. how can I fix the problem??? here is my code: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <script src="js/jquery-1.4.1.js" type="text/javascript"></script> <script src="js/jquery.maskedinput-1.2.2.js" type="text/javascript"></script> <script type="text/javascript"> function mycheck() { if ($('#<%=chk.ClientID %>').is(':checked')) { $("#<%=txt.ClientID %>").unmask(); $("#<%=txt.ClientID %>").val(""); $("#<%=txt.ClientID %>").mask("999999999999"); } else { $("#<%=txt.ClientID %>").unmask(); $("#<%=txt.ClientID %>").val(""); $("#<%=txt.ClientID %>").mask("(999)999-9999"); } } </script> <style type="text/css"> #form1 { margin-top: 0px; } </style> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <p> <asp:CheckBox ID="chk" runat="server" CssClass="kk" onclick="mycheck()" /> </p> <p> <asp:TextBox ID="txt" runat="server" CssClass="tt" ></asp:TextBox> </p> </div> </form> </body> </html>

    Read the article

  • jquery upgrade breaking existing code

    - by Victor
    I have a following event handler which worked in jquery 1.3.2 but stopped working when we upgraded to 1.8.2, still fired but doesn't do anything $('input.maskedInput').focus(function () { $(this).mask("999-999-9999"); }).blur(function () { $(this).unmask(); var numbers = $(this).val().replace(/-/g, '').replace(/_/g, ''); $(this).val(numbers.toString()); }); What could be a problem?

    Read the article

1