Make checkbox and a textbox Readonly
<p>Following is my javascript code,is there a way to make checkbox and textbox readonly?</p>

<pre><code>//display textboxes and checkbox when condition is true.
if($$("id").value =="something"){
       document.getElementById("textboxl").style.display="";
        document.getElementById("chkbox1").style.display="";
        document.getElementById("textbox2").style.display="";
        document.getElementById("chkbox2").style.disable="";
    }
</code></pre>

<p>I have to display and then disable it(i mean make it readonly).</p>
