<--- --------------------------------------------------------------------------------------- ---- Blog Entry: Ask Ben: Javascript String Replace Method Author: Ben Nadel / Kinky Solutions Link: http://www.bennadel.com/index.cfm?dax=blog:142.view Date Posted: Jul 17, 2006 at 7:36 AM ---- --------------------------------------------------------------------------------------- ---> function RandomString2( strTargetInstance // This is the target string match instance. ){ var arrLetters = ["A","B","C","D","E","V","W","X","Y","Z"]; var intLetter = (Math.floor( Math.random() * 10 ) % 9); // Return the random letter string we get from the // array of letters above. This time, though, we are // going to include the target string to demonstrate // that it has been passed in. return( "[" + strTargetInstance + " : " + arrLetters[ intLetter ] + "]" ); }