themob212 .
Posts: 0
Joined: Tue May 27, 2014 5:26 pm

Local Varibles

Can I make a local varible random (between one and ten) as an event?

Thank you!

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Local Varibles

Hello,

Please, take a look at this link: https://getsatisfaction.com/apperyio/...

themob212 .
Posts: 0
Joined: Tue May 27, 2014 5:26 pm

Local Varibles

Thanks. Thats close to what I want but I really just want to know if I can use the on click section to create the random local variable OR can I have it insert it insert an existing string.
.
If I cannot, I can follow most of the link and know that you want me to stick that into the javascript thing and have it run on click but I am unsure what I am doing in terms of mapping the request data from my service :S

Sorry, very tired newbie here :)

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Local Varibles

Hi -

Following the example of the link above:
precode
var min = 1, max = 10;
var rand = min - 0.5 + Math.random () * (max-min +1)
rand = Math.round (rand);
/code/pre
rand variable will be a random number from 1 to 10.

Return to “Issues”