I have 3 inputs on the HTML form: Old password, New password, and Retype New password. I use JQuery Password Validation plugin for New password field. But If three inputs were type of password, the plugin affected all three inputs. I want that it affect only one input (New password), how can I do that? The following is my code:
// The following code is in an UserControl, the form is in the page containt this control
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<script type="text/javascript">
// This script is for validation
Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(CheckValidationStatus);
function CheckValidationStatus(sender, args) { { var isValid = $("form").validate().form(); args.set_cancel(!isValid); } }
</script>
<table class="listing form" cellpadding="0" cellspacing="0">
<tr>
<td class="first"><strong>Old password:</strong></td>
<td class="last ofield">
<asp:TextBox ID="txtOldPassword" runat="server" CssClass="text required" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr class="bg">
<td class="first" width="172"><strong>New password:</strong></td>
<td class="last pwdfield">
<asp:TextBox ID="tNewPassword" runat="server" CssClass="text password" TextMode="Password" ></asp:TextBox>
<span>Password strength</span>
<div class="password-meter">
<div class="password-meter-message">Quá ng?n</div>
<div class="password-meter-bg">
<div class="password-meter-bar"></div>
</div>
</div>
</td>
</tr>
<tr>
<td class="first"><strong>Retype Password:</strong></td>
<td class="last ofield"><asp:TextBox ID="txtRetypePassword" runat="server" CssClass="text" TextMode="Password" ></asp:TextBox></td>
</tr>
</table>
<p style="text-align:right">
<asp:Button ID="Button1" runat="server" Text="Update" />
</p>
</ContentTemplate>
</asp:UpdatePanel>