Include Mikrotik dictionary
[freeradius.git] / dialup_admin / htdocs / password_generator.jsc
1 <script language="JavaScript"><!--
2
3 /*******************************************************
4 * Random Password Generator JavaScript
5 * <http://www.kipp.smith.net/javascripts/random.htm/>
6 * This script is free as long as original credits remain.
7 ********************************************************/
8
9 // Use the following variables for password characters
10 // and length
11
12   var characters="0123456789abcdefghijklmnopqrstuvwxyz"
13
14   var passwordlength=0
15
16 function generatepassword(object, plength) {
17 // This function will build a string using randomly
18 // generated characters.
19
20   var password = ""
21   var n = 0
22   var randomnumber = 0
23   passwordlength=plength
24   while( n < passwordlength ) {
25      n ++
26      randomnumber = Math.floor(characters.length*Math.random());
27      password += characters.substring(randomnumber,randomnumber + 1)
28   }
29
30 // Display the word inside the form text box
31
32   object.value = password
33 }
34
35 // --></script>