Solved

Disabled vs Readonly property for text boxes

Posted on 2012-03-15
2
308 Views
Last Modified: 2012-03-23
Is there any disadvantage using the disabled over the readonly for a text box?  I was told it was a better practice to use readonly.  I cannot seem to find any reference to this being a best practice.
0
Comment
Question by:monica73174
2 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 250 total points
ID: 37726134
if you make a text box disabled, then you wont be able to get its value, and it won't get submitted to the server.
0
 
LVL 14

Assisted Solution

by:systan
systan earned 250 total points
ID: 37726161
when disabled you can't get/set a value
when readonly you can get value but you can't set, on textbox you can
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question