Skip to content
Advertisement

Hidden password only works in one input box

I have this JS code that shows 2 input boxes that asks for a password: 1) Password 2) Confirm Password. However, the clickShowPassword() is only connected to Password.

[Output] [1]: https://i.stack.imgur.com/IZoa3.png

Here’s my whole js file that is connected to an react application.

JavaScript

Advertisement

Answer

In your second input you used passwordConf as an input type, I think this happened because u copied the first input and batch-replaced all “password” words with “passwordConf”, happens to the best of us 🙂

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement