Random text string in Javascript
This worked fine:
for(var c = ''; c.length < 32;) c += Math.random().toString(36).substr(2, 1)
Which reminded me of this uuid one:
"00000000-0000-4000-8000-000000000000".replace(/0/g,function(){return(0|Math.random()*16).toString(16)})