Migueliithox
New Member
How to I disable the textbox by default and let the user enable it via checkbox?\[code\]<input type="checkbox" id="sccb" name="science" value="http://stackoverflow.com/questions/15892782/science"><script type="text/javascript"> $(document).ready(function(){ $('#sccb').click(function(){ if (this.checked) { $('#cns').removeAttr("disabled"); } else { $("#cns").attr("disabled", true); } }); });</script><input type="text" id="cns" name="coornamescience" disabled="disabled" size="30"></input>\[/code\]