I have a html page which requires two passwords, if these do not match a div appears to say so. Within the div a checkbox is also shown when the user checks this it should change the password type to text and vice versa. I seem to be having problems detecting if the checkbox is detected or not.
$("#password_error").html('Passwords do not match <br /> <span class="password_error"><input type="checkbox" id="password_text" /> Show Characters</span>');
$("#password_error").show("slow");
checkbox_status();
function checkbox_status()
{
if ($('#password_text').is(':checked'))
{
$('input:password[type="text"]');
}
}
The ID on the input box for password is "password".
Any advice? Thanks
type="password"totype="text"isn't allowed, and can't be set via JS): alistapart.com/articles/the-problem-with-passwords .