Trying to change input type attribute from password to text.
$(\'.form\').find(\'input:password\').attr({type:\"text\"
I know I'm a little late to the game, but I was just able to do this in IE9 (it appears that Microsoft decided to allow it?). However, I had to do it with straight JavaScript. This is just a sample of a form with a dropdownlist that changes the field type depending on what is selected in the dropdown.
function switchSearchFieldType(toPassword) {
$('#SearchFieldText').val('');
if (toPassword === true) {
$('#SearchFieldText').get(0).setAttribute('type', 'password');
} else {
$('#SearchFieldText').get(0).setAttribute('type', 'text');
}
}
$('#SelectedDropDownValue').change(function () {
if ($("select option:selected").val() === 'password') {
switchSearchFieldType(true);
}
else {
switchSearchFieldType(false);
}
}).change();