Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I detect when a browser enters a stored password into web login

I have a website that detects when a user name and password has been entered, then enables the login button. The problem is if the browser enters the user name and password that it has remembered then the login button is never enabled. Is there a way in JavaScript to detect a browser entering this information?

like image 446
Tim Avatar asked Jul 08 '10 01:07

Tim


2 Answers

You could poll for it with setInterval(), but why would you want it to be disabled before the details are entered anyway?

It doesn't seem to be a widespread practice.

like image 123
alex Avatar answered Oct 30 '22 03:10

alex


Alternatively, you could keep the button enabled and check for a non-blank input when it is pressed. This would be more standard, as others have indicated.

like image 45
harpo Avatar answered Oct 30 '22 03:10

harpo