Javascript update input element
<p>I have quite a large IF statement which needs to update another form element depending on which scenarion only Its not working, By not working I mean its not updating the form element nor executing any more code in that statement.</p>

<p>My code is...</p>

<pre><code>window.onload = function() {
new Dragdealer('magnifier', {
    steps: 10,
    snap: true,
callback: function(value) {
    if(value == 0) {
        alert('1');
        }
    else if(value == 0.1111111111111111) {
        alert('2');
        }
    else if(value == 0.2222222222222222) {
        alert('3');
        }
    else if(value == 0.3333333333333333) {
        alert('4');
        }
    else if(value == 0.4444444444444444) {
        document.getElementById(coff_upd).value = '5';
        alert('5');
        }
    else if(value == 0.5555555555555556) {
        document.getElementById(coff_upd).value = '6';
        alert('6');
        }
    else if(value == 0.6666666666666666) {          
        document.getElementById(coff_upd).value = '7';
        alert('7');
        }
    else if(value == 0.7777777777777778) {
        document.getElementById(coff_upd).value = '8';
        alert('8');
        }
    else if(value == 0.8888888888888888) {
        document.getElementById(coff_upd).value = '9';
        alert('9');
        }
    else {
        document.getElementById(coff_upd).value = '10';
        alert ('10');
    }
    }
});
}
</code></pre>

<p>and the input...</p>

<pre><code>    &lt;input type="text" value="&lt;?php echo $user_curr_coff;?&gt;" name="coff_upd" id="coff_upd" /&gt;
</code></pre>
