Javascript variable scroll issue
<p>I have a page whereby the user can press left + right buttons to scroll through numbers between 1-10.</p>

<p>The default value is 0 which displays blank.</p>

<p>There are two buttons at the bottom which allow the user to 'Clear' the number - reseting it to 0. Or to 'Shuffle', picking a random number.</p>

<p>After this the user can submit these numbers into a database.</p>

<p>My issue is, if the user were to scroll to 5 (for example), click shuffle then submit, it would submit '5' instead of the random number it should have generated.</p>

<p>Also if the user only clicks 'shuffle' then submit, it'll input '0'.</p>

<p>The issue with the 'clear' button is similar, if the user scrolls to 5, then hits reset, the variable would stay at '5' when submitted.</p>

<p>I'm probably overcomplicating something very simple, and im sorry if i am, but this is annoying me.</p>

<p>Thankyou ~ </p>
