simple while issue (javascript)
<p>Can any body shed some light on why I am not able to stop and start this loop?</p>

<pre><code> &lt;input type="button" value="start" onclick="start()"&gt;
 &lt;input type="reset" value="stop" onClick="stop()"&gt;

var startLottery = false;

while(startLottery){
setInterval(function(){automateLottery()},120);
startLottery;
};

var start = function(){
startLottery = true;    
};

var stop = function(){
startLottery = false;   
};
</code></pre>

<p>Thank you</p>
