Edu-IT Posted June 12, 2008 Posted June 12, 2008 What happens in Vegas, stays in Vegas Although if you get married in Vegas - you are, in fact, married everywhere Andy Who said that?
EduTech Posted June 12, 2008 Author Posted June 12, 2008 If anyone wants the code i can attach it somewhere, would be easy to add to an intranet page etc... and any feedback/improvements welcome.QUOTE] That would be very handy if you could do that tom, will come in very handy. Maybe could add it to the wiki that was people on edugeek could improve it and make changes. or if you wish for it to be left that scrap that Thanks James. Oh and glad to here gav's oki
dave.81 Posted June 13, 2008 Posted June 13, 2008 Will be putting a few of those posters up around the college, a few in the staff room are needed too
tom_newton Posted June 13, 2008 Posted June 13, 2008 Le Javascreept: all you need now is an HTML form.... function password(len,hasnum) { // password(length,hasnum) length = password len, hasnum != 0 you get // a number in there var pass = ""; var digit = -1; if (hasnum) { digit = Math.round((len-1)*Math.random()); } var flip = true; if (Math.random() > 0.7) { flip = false; } for(var i=0; i { var isdig = 0; if (i == digit) { isdig = 1; } if (flip) { pass = pass + consonant(isdig); } else { pass = pass + vowel(isdig); } flip = !flip; } return pass; } function vowel(num) { var vow = [ 'a', 'e', 'i', 'o', 'u', 'y']; if (num) { vow = ['0','3','4']; } var i = Math.round((vow.length-1)*Math.random()); return vow; } function consonant(num) { var con = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z']; if (num) { con = ['1','2','5','6','7','8','9']; } var i = Math.round((con.length-1)*Math.random()); return con; }
tom_newton Posted June 13, 2008 Posted June 13, 2008 pox, there goes the indentation Feel free to do whatever you like with that code.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now