DEV Community

NehemyaBaipalli
NehemyaBaipalli

Posted on

Change the password visibility after certain time

Hello World! This is Nehemiah. Recently, I've started working on a web page designing project, which actually deals with the password management system. User has to access a server by entering it's (newly updated) password in DB. In the first html page, server name and IP address will be asked. Once the user enters the proper details, the respective password will be displayed on the Screen. Here is the main concern. Once the password is visible on the screen, it should get automatically invisible after 1 minute. I've tried doing it by using timestamp function. But unable to achieve the same. Could anybody help me with the same?

Top comments (1)

Collapse
 
nickvoerman profile image
Nick

Maybe call the invisible function with a timeout of 1 minute?

function myFunction() {
setTimeout(function(){ alert("hide"); }, 60000);
}