Forum Discussion
EOMDevelepors
6 years agoQrew Captain
This is a copy of a pastie by Dan. Can't find the original post:
function makePasswd() {
var passwd = '';
var chars = '0123456789';
for (i = 1; i < 8; i++) {
var c = Math.floor(Math.random() * chars.length + 1);
passwd += chars.charAt(c)
}
return passwd;
}
//replace fid_21 with the field ID you want to enter the autonumber.
$("#_fid_21").val(makePasswd());
function makePasswd() {
var passwd = '';
var chars = '0123456789';
for (i = 1; i < 8; i++) {
var c = Math.floor(Math.random() * chars.length + 1);
passwd += chars.charAt(c)
}
return passwd;
}
//replace fid_21 with the field ID you want to enter the autonumber.
$("#_fid_21").val(makePasswd());