Hi
I'm trying generate a random Id, but is happening some troubles.
i'm using this function:
In aptana emulator, the function is OK. Always show me a new string, but in my phone(e63) and others(n95), always show me "qyqjG".Code:function makeid(){ var text = ""; var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; now = new Date(); var seed = now.getSeconds(); for(var i = 0; i < 5; i++) { text += possible.charAt(Math.floor(Math.random(seed) * possible.length)); } return text; }
have any other way to get a random string?
Tnk u

Reply With Quote

