Ah yes thank you!<br><br>I had tried to add a 'disabled: true' but apparently I put it at the wrong place and it wasn't working.<br>Now it's all good thanks.<br><br><div class="gmail_quote">On Mon, Nov 15, 2010 at 11:51 AM, Nick Ager <span dir="ltr"><<a href="mailto:nick.ager@gmail.com">nick.ager@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Giles,<div><br></div><div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); 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><div>Try:</div><div><br></div><div><div><span style="white-space: pre-wrap;">        </span>html checkbox</div>
<div><span style="white-space: pre-wrap;">                </span>value: true;</div><div><span style="white-space: pre-wrap;">                </span>disabled: true;</div><div><span style="white-space: pre-wrap;">                </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 class="im"><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); 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><div><span style="white-space: pre-wrap;">        </span>html checkbox</div>
<div><span style="white-space: pre-wrap;">                </span>id: #myDisabledCheckbox;</div><div><span style="white-space: pre-wrap;">                </span>value: true;</div><div><span style="white-space: pre-wrap;">                </span>disabled: true;</div>
<div><span style="white-space: pre-wrap;">                </span>with: 'a disabled checkbox'.</div><div><span style="white-space: pre-wrap;">                </span></div><div><span style="white-space: pre-wrap;">        </span>html checkbox</div>
<div><span style="white-space: pre-wrap;">                </span>value: true;</div><div><span style="white-space: pre-wrap;">                </span>onClick: ((html jQuery: #myDisabledCheckbox) attributeAt: 'checked' put: (html jQuery this attributeAt: 'checked'));</div>
<div><span style="white-space: pre-wrap;">                </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/" target="_blank">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>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br>