Live calculation doesn't work
<p>I'm doing some live calculations while user typing.</p>

<p>It's weird, it works in jsfiddle but not in localhost.</p>

<pre><code>window.onload = function() {

    var base = 10;
    var numberField = document.getElementById('numberField');

    numberField.onkeyup = numberField.onpaste = function() {

        if(this.value.length == 0) {

            document.getElementById('result').innerHTML = '';
            return;

        }

        var number = parseInt(this.value);

        if(isNaN(number)) return;

        document.getElementById('result').innerHTML = number * base;

    };

    numberField.onkeyup(); //could just as easily have been onpaste();
};
</code></pre>
