Toggle the display of a text field with a checkbox
<p>When Unlimited is checked, remove the input box. That works. However, when the checkbox is unchecked the input box wont show back up.</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function getQuantity() {
        var checkbox = document.getElementById("unlimited");
        var qty = document.getElementById("quantityspace");
        if(checkbox.checked == true){
             qty.style.display = 'none';
        }else if(checkbox.checked == false) {
             qty.stlye.display = '&lt;input type="text" id="quantity" size="4" value="1" name="quantity" /&gt;';
        }
    }
&lt;/script&gt;

&lt;input type="checkbox" id="unlimited" name="unlimited" value="x" onClick="getQuantity(); " /&gt; Unlimited? &lt;span id="quantityspace"&gt;or specify:
&lt;input type="text" id="quantity" size="4" value="1" name="quantity" /&gt;&lt;/span&gt;
</code></pre>
