I want to show a dialog box containing a random code I make. This is my function:
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 8;
var randomstring = '';
for (var i = 0; i < string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum, rnum + 1);
}
alert(randomstring);
window.location = "Insert-Transac.jsp";
}
I want to show the variable randomstring
for a time and hide it. Can any one help me?