There is a document type field, and the document number field when you select a specific document type from the document type field on the document number field should display the N symbol automatically with a mask. And I have the other way around N being displayed only after entering. What is the problem? Share thoughts. Thanks in advance !
$("#<%=PC%>_DocType").live('change', function () { $('#<%=PC%>_PassNumber').val(''); var docType = this.value; if (docType == 1) { $("#<%=PC%>_PassNumber").unmask(); $("#<%=PC%>_PassNumber").mask("N?9999?9999"); } else if (docType == 49) { $("#<%=PC%>_PassNumber").unmask(); $("#<%=PC%>_PassNumber").mask("A?9999?9999"); } else if (docType == 2) { $("#<%=PC%>_PassNumber").unmask(); $("#<%=PC%>_PassNumber").mask("99999?9999"); } else (docType == 4) { $("#<%=PC%>_PassNumber").unmask(); $("#<%=PC%>_PassNumber").mask("99999?9999"); } }