But I really wanted readonly. This didn't work:
$(span.readonly input).attr(readonly, true);
But these did. Note the camelCase:
$(span.readonly input).attr(readOnly, true);
$(span.readonly input).each(function() {
this.readOnly = true;
});
I think that is
Klaus Hartl schrieb:
But I really wanted readonly. This didn't work:
$(span.readonly input).attr(readonly, true);
But these did. Note the camelCase:
$(span.readonly input).attr(readOnly, true);
$(span.readonly input).each(function() {
this.readOnly = true;
});
Jörn Zaefferer schrieb:
Klaus Hartl schrieb:
But I really wanted readonly. This didn't work:
$(span.readonly input).attr(readonly, true);
But these did. Note the camelCase:
$(span.readonly input).attr(readOnly, true);
$(span.readonly input).each(function() {
On 10/19/06, Klaus Hartl [EMAIL PROTECTED] wrote:
Jörn Zaefferer schrieb:
Klaus Hartl schrieb:
But I really wanted readonly. This didn't work:
$(span.readonly input).attr(readonly, true);
But these did. Note the camelCase:
$(span.readonly input).attr(readOnly, true);
I've found some inconsistent behavior in IE vs. FF and was wondering if someone might know a workaround.I have some form fields, for which the HTML is generated by a template system out of my control. I want to set some of the fields to readonly so I wrap them in a span that has a readonly class.
$(span.readonly input).attr(disabled, disabled);
Does this work?
$(span.readonly input).attr(disabled, true);
The XHTML attribute is disabled=disabled but the Javascript property is
boolean.
___
jQuery mailing list
discuss@jquery.com
It isn't as pretty but you could just loop through them and set the
property manually.
$(span.readonly input).each(function() {
this.disabled = true;
});
I believe a fix for this is in the works, so that attr would work as
you expected.
--
Brandon Aaron
On 10/18/06, Dave Methvin [EMAIL