Re: [jQuery] How to make input readonly with jQuery in IE

2006-10-19 Thread Brandon Aaron
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);
> >>>
> >>>
> >>> $("span.readonly input").each(function() {
> >>> this.readOnly = true;
> >>> });
> >>>
> >> I think that is one for the attributes fix list?
> >>
> > ie: readonly: "readOnly"?
>
> yes!

This is now in SVN Rev: 452 and doing $().attr("readonly", true); will
work as expected.

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to make input readonly with jQuery in IE

2006-10-19 Thread Klaus Hartl


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() {
>>> this.readOnly = true;
>>> });
>>> 
>> I think that is one for the attributes fix list?
>>   
> ie: readonly: "readOnly"?

yes!


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to make input readonly with jQuery in IE

2006-10-18 Thread Jörn Zaefferer
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;
>> });
>> 
>
> I think that is one for the attributes fix list?
>   
ie: readonly: "readOnly"?

-- Jörn

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to make input readonly with jQuery in IE

2006-10-18 Thread Klaus Hartl

> 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 one for the attributes fix list?


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to make input readonly with jQuery in IE

2006-10-18 Thread David Avraamides
> Posted: Wed Oct 18 18:01:44 EDT 2006> From: Brandon Aaron gmail.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 gmail.com> wrote:> > > $("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.> >> >
 
These worked:
    $("span.readonly input").attr("disabled", true);
 
    $("span.readonly input").each(function() {    this.disabled = true;    });
 
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;    });
 
Thanks guys.
 
On 10/18/06, David Avraamides <[EMAIL PROTECTED]> wrote:
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  that has a readonly class. The HTML looks like this: 
    Some textI have tried each of the following queries and none of them have the desired effect. Its like they aren't modifying the DOM. 
  $("span.readonly input").attr("readonly", "readonly");  $("span.readonly input").attr("disabled", "disabled");  $("span.readonly
 input").focus(function() { $(this).blur(); });These work (with varying effects) in FF but not in IE. However if I manually put the attributes (or script) on an input field in IE it does work. I know I have the queryright because I did this 
  $("span.readonly input").focus(function() { alert('here'); });and I get a popup when I click on the field.Can anyone help with this?Thanks,-Dave

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to make input readonly with jQuery in IE

2006-10-18 Thread Brandon Aaron
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 PROTECTED]> wrote:
> >  $("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
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to make input readonly with jQuery in IE

2006-10-18 Thread Dave Methvin
>  $("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
http://jquery.com/discuss/