Javascript: assign/pass a value to a inputbox
<p>I have this javascript for slider, my problem is i cant assign/pass the value of the slider to a inputbox. I already tried using this scripT "document.getElementByID('total').value = pos" in my javascript, but it didnt pass anything. any idea guys?  Thanks in advance!</p>

<p>HTML CODE:</p>

<pre><code>&lt; input type="hidden" id="total" value="" style="border:0; color:#f6931f; font-weight:bold;" runat="server" /&gt;   
</code></pre>

<p>JAVASCRIPT FUNCTION: </p>

<pre><code>window.addEvent('domready', function() 
    {
        var mySlideB = new Slider($('slider_gutter_1'), $('slider_knob_1'),         $('slider_bkg_img_1'),
        {
            start: 1,
            end: 100,
            offset: 10,
            onChange: function(pos)
            {
                if (pos &lt;= 10) {
                    $('slider_desc_value').setHTML("Not Important");
                }
                else if ((pos &gt;= 11) &amp;&amp; (pos &lt;= 40)) {
                    $('slider_desc_value').setHTML("Partially Important");
                }
                else if ((pos &gt;= 41) &amp;&amp; (pos &lt;= 60)) {
                    $('slider_desc_value').setHTML("Important");
                }
                else if ((pos &gt;= 61) &amp;&amp; (pos &lt;= 85)) {
                    $('slider_desc_value').setHTML("Very Important");
                }
                else if (pos &gt; 85) {
                    $('slider_desc_value').setHTML("Critical to our business");
                }

                $('slider_current_val').setHTML(pos + ' %');
                $('testjp').setHTML(pos);    

                                    // THIS IS NOT WORKING, HELP?
                **document.getElementById('total').value = pos;**

                                    //This work c/o Ravi. THanks!
                                    document.forms["form1"]["total"].value = pos;

            }
        }, null).setMin(1);

        $('slider_current_val').setHTML(100 + ' %');
    });
</code></pre>
