Hi Giles,<div><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I have a form with a bunch of checkboxes. I want some of them to be disabled depending on wether some other are checked or not.<br>
I just can't figure out how to make a read-only checkbox (so that it would still show but would be greyed out). </blockquote><div><br></div><div><div>Try:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>html checkbox</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span>value: true;</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>disabled: true;</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>with: 'a disabled checkbox'</div>
<div><br></div><div><br></div><div>#disabled: works for all form elements.</div><div><br></div><div><br></div></div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Is there such a thing in seaside (optimally with jquery so they can be updated on the fly when the user check/uncheck a box).<br></blockquote><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html checkbox</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>id: #myDisabledCheckbox;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>value: true;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>disabled: true;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>with: 'a disabled checkbox'.</div><div><span class="Apple-tab-span" style="white-space:pre">                </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html checkbox</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>value: true;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>onClick: ((html jQuery: #myDisabledCheckbox) attributeAt: 'checked' put: (html jQuery this attributeAt: 'checked'));</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>with: 'mirror the other checkbox'</div></div><div><br></div><div><br></div><div>To put this example together I Googled 'jQuery checkbox' - found <a href="http://www.electrictoolbox.com/check-uncheck-checkbox-jquery/">http://www.electrictoolbox.com/check-uncheck-checkbox-jquery/</a> then translated the result into Seaside jQuery.</div>
<div><br></div><div>Hope this helps</div><div><br></div><div>Nick</div><div> </div></div></div>