Hello,
I want to create Random Password Generator, I found the following on net:
function generatePassword() {
var length = 8,
charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
retVal = "";
for (var i = 0, n = charset.length; i < length; ++i) {
retVal += charset.charAt(Math.floor(Math.random() * n));
}
return retVal;
}
My Button has the following attribute: <input id="Generate Password" onclick="generatePassword(this.value)" type="button" value="Generate Password">
The id of the field is: q12
The id of Text Field is: q11
I want, when the user hits the button, a random password should be populated in the text field q11.
Please help.
Regards,
S