Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
Hi, I am trying to generate a random number between 1 and 999,999 in a number field when a document opens. Can anyone give me a suggestion please?
This is one method...
// form1.page1.subform1.randomNumber::initialize - (JavaScript, client)
this.rawValue = Math.random() * (999999 - 1) + 1;
See https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/Math/Random
Steve
Views
Likes
Replies