Hi Guys,
I'm working on masking some input fields, for the credit card field requirement is that characters should be masked while you are typing in the field and also on focus out. So ofcourse I achieved that easily by converting the field to type password. But the next requirement is that when the user clicks back in the field (focus), it should should show the value but as soon as the user starts typing, the value should be masked. I've tried all sorts of things but I was finally stuck because of IE 8 , as it won't let me change the type. Does anyone have a solution that will work in all browsers including IE 8?

Thank you!