File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Regarding readOnly property of input type control in html. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Regarding readOnly property of input type control in html." Watch "Regarding readOnly property of input type control in html." New topic

Regarding readOnly property of input type control in html.

neena gupta

Joined: Sep 17, 2006
Posts: 5
<input name="txt1a" type="text" class="txtBoxM" id="txt1a" />

I have this textbox i want to keep readOnly property true in beginning and then i have one select box(combo). When i select any value from that(It means on Onchange event ofs selectbox) then using javascript i want to change my readOnly property of textbox to false.

I have tried many times but that is not working.

Could any body help me.
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 9962

Try this out:

P.S.: You might have to change your name to follow the Naming Policy of Javaranch

[My Blog] [JavaRanch Journal]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60822

"neenascjp gupta",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. "neenasjcp" is obviously not your real name, so it fails the policy test.

JavaRanch Sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703

"neena gupta"

Please review the javaranch naming policy on fictitious names and udpate your name accordingly.


My Blog: Down Home Country Coding with Scott Selikoff
Don't get me started about those stupid light bulbs.
subject: Regarding readOnly property of input type control in html.
Similar Threads
what's wrong with this script
border of textbox
generate table fields by clicking an option!!!
Populating text area
HTML/JavaScript: user defined number of textboxes help