[Javascript] turning readonly off?

bill.marriott at agric.nsw.gov.au bill.marriott at agric.nsw.gov.au
Thu Jan 13 15:01:58 CST 2005


thanks

document.myform.myelement.readOnly = false;

does it!


Bill Marriott
Analyst/Programmer
Information Technology
NSW DPI
Orange

Ph.  02 6391 3657
Fax. 02 6391 3290



                                                                                                                                             
                      "Allard Schripsema"                                                                                                    
                      <allard-schripsema at procergs        To:       "[JavaScript List]" <javascript at LaTech.edu>                               
                      .rs.gov.br>                        cc:                                                                                 
                      Sent by:                           Subject:  RE: [Javascript] turning readonly off?                                    
                      javascript-bounces at LaTech.e                                                                                            
                      du                                                                                                                     
                                                                                                                                             
                                                                                                                                             
                      14/01/2005 12:27 AM                                                                                                    
                      Please respond to                                                                                                      
                      "[JavaScript List]"                                                                                                    
                                                                                                                                             
                                                                                                                                             




Hi,

oInput.disabled=false;
oInput.readOnly=false;

works in IE.

allard Schripsema


-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu]On Behalf Of Hakan M (Backbase)
Sent: Thursday, January 13, 2005 11:17 AM
To: [JavaScript List]
Subject: Re: [Javascript] turning readonly off?


Since readonly is one of the old "short" HTML attributes (that you have
to specify with readonly="readonly" in XHTML) my guess would be to set
the attribute to nothing.

oInput.setAttribute('readonly', '');

You could also try oInput.removeAttribute('readonly');

Regards,
H

Bill & Janine Marriott wrote:
> Hi Everyone,
>
> I've got a question on the 'readonly' state of a form text input element.
>
> What is the proper syntax to turn the readonly state off in javascript?
>
> thanks
>
> Bill
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript





This message is intended for the addressee named and may contain
confidential information. If you are not the intended recipient or received
it in error, please delete the message and notify sender. Views expressed
are those of the individual sender and are not necessarily the views of
their organisation.





More information about the Javascript mailing list