Number only script doesn't work in firefox 17
<p>Hi I have below code in a Javascript. This does not work
(You can type in letters) on Firefox 17 and works fine with other browsers. Can some one tell me a workaround? Thank you for looking.</p>

<pre><code>function onlyNumbers(evt)
{
var e = event || evt; // for trans-browser compatibility
var charCode = e.which || e.keyCode;

if (charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57))
    return false;

return true;

}
</code></pre>

<p>EDIT:</p>

<pre><code>&lt;input name="outletno" type="text" id="outletno" size="15" maxlength="10" onkeypress="return onlyNumbers()" value="&lt;?= htmlentities ($values['outletno']) ?&gt;"&gt;&lt;/td&gt;
</code></pre>
