This topic is locked

Random number generator

6/15/2011 11:31:05 AM
PHPRunner General questions
M
munkeh author

Dear,
I made a button and in 'client before' I use the following code :
document.forms.editform1.value_code_1.value=Math.floor(Math.random()*(9548659-1109867)+1109867);

return;
code is my actual fieldname, still it doesnt show the random generated number in the text bos in phprunner 5.3 (It did work in 5.2)
Any ideas?
Regards,

Sergey Kornilov admin 6/15/2011

The best approach is to use Javascript API, specifically setValue() function:

http://xlinesoft.com/phprunner/docs/ctrl_setvalue.htm