<script type="text/javascript">
jQuery(document).ready(function($){ //set a random 9-char key
var lenght = 9; // lenght of key
var randomChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0123456789'; //any string
var result = '';
for ( var i = 0; i < lenght; i++ ) { //fills result with 9 random characters from randomChars
result += randomChars.charAt(Math.floor(Math.random() * randomChars.length));
}
return result; // do anything with "result" string
});
</script>

