[Html-widget] Read-only attribute?
Michael Gray
mjg17 at eng.cam.ac.uk
Thu Jun 22 10:53:02 CEST 2006
On Wed, 21 Jun 2006, Adam Sjøgren wrote:
> On Wed, 21 Jun 2006 16:06:25 +0100 (BST), Michael wrote:
>
> > I could do this by hand in the code by choosing between a Textfield or a
> > Span, but it would be much nicer if I could just add a "->readonly(1)"
> > to the element and have it Do The Right Thing, taking care of outputting
> > the label and the read-only value in a suitable fashion.
>
> Setting the HTML attribute disabled="disabled" on the element could
> perhaps be a solution¹?
>
> ¹ <http://www.w3.org/TR/html4/interact/forms.html#adef-disabled>
Yup, that does it, thanks!
(I was sure that there should have been such an attribute, but neither
of the quick-refs I browsed mentioned 'disabled' or 'readonly'. I
should have gone to the source!)
Cheers
--
Michael
More information about the Html-widget
mailing list