How can I hide the password entered by a user in a dialog prompt in JavaScript? For example, using something like
var passwd = prompt(\"Enter Password : \",
I have tried to solve the same problem in the following way:
In the main page the user shall press a button in order to launch the request
pressing a button will open a popup windows by the JavaScript command window.open("password.html","passwordRequest",windowStyleVar)
,
where windowStyleVar
may be:
var windowStyleVar = "top=10, left=10, width=250, height=200, status=no,
menubar=no, toolbar=no scrollbars=no";
password.html looks like:
Richiesta password
type the password
The window.opener.processRequest()
call is very important as it returns the control to the main page forcing main page javascript to complete the intended action.