Javascript random number picker not working
<p>I'm trying to make a simple javascript application to pick a random number between 1 and a number I specify in an input field, so I can pick a random winner for a Christmas competition. </p>

<p>Below is the code I've got so far. I don't think it can be far off, can you help me as it's not updating the input field to display the random number:</p>

<pre><code>&lt;script type="text/javascript" language="javascript"&gt;
  function randomWinner() {
    var topNumber = topNumber.value;    
    var randomnumber=Math.floor(Math.random() + topNumber);
    winningNumber.value=randomnumber;
    return true;
  }
&lt;/script&gt;

&lt;form name="selectWinner"&gt;
Pick random number between 1 and &lt;input name="topNumber" value="100"&gt;&lt;br /&gt;&lt;br /&gt;
The winning number: &lt;input name="winningNumber" readonly="true"&gt;&lt;br /&gt;&lt;br /&gt;
&lt;input type="button" value="Pick Winner" OnClick="randomWinner();"&gt;
&lt;/form&gt;
</code></pre>
