You can use the Math.random() function to generate a random number between 0 and 1, and then write your own function to turn that into a confirmation code.
For example, in the initialize event for a field you could use code like this:
--
var confirmCode = "";
for (var i=0; i<8; i++)
{
confirmCode += String.fromCharCode(65 + (Math.random() * 26.0));
}
this.rawValue = confirmCode;
--
To put in this code, drop a field on the form, select the field, and then show the Script Editor window. In the Show list in the Script Editor, pick the Initialize event, set the Language to JavaScript, and paste in the code above.
--
SteveX
Adobe Systems