Web Hosting Directory | Web Hosting Resources | Webmaster Resources | Domain Tools | Search Engine Marketing | Forums
  Signup
Today: 1,224   Yesterday: 1,015   Max: 1,872   Total: 464,277   Current Users : 21 (Member 0) 
DOMAIN TOOLS

WEBMASTER TOOLS

RELATED ARTICLES

SUBMIT AN ARTICLE

Write for us and get publicity, link to your website, and best of all get paid. Please visit our writers page for details.


LINK TO US

Link to us and earn points for each visitor you bring to us. Please visit our link partner page for details.

 

Attributes for <INPUT ...>
DISABLED
READONLY

READONLY and DISABLED both remove the functionality of the input field, but to different degrees. READONLY locks the field: the user cannot change the value. DISABLED does the same thing but takes it further: the user cannot use the field in any way, not to highlight the text for copying, not to select the checkbox, not to submit the form. In fact, a disabled field is not even sent if the form is submitted.

Currently only MSIE recognizes either of these attributes.

this code produces this
<INPUT NAME="realname" VALUE="Hi There" READONLY>
<INPUT NAME="realname" VALUE="Hi There" DISABLED>

It's important to understand that READONLY merely prevents the user from changing the value of the field, not from interacting with the field. For many types of fields, READONLY is irrelevent because you don't normally change the value. In checkboxes, for example, you can check them on or off (thus setting the CHECKED state) but you don't change the value of the field. DISABLED, however, actually prevents you from using the field. Notice in these examples that you can set the checkboxes even though they are "read only":

this code produces this
<INPUT NAME="mushrooms" TYPE=CHECKBOX READONLY>mushrooms<BR>
<INPUT NAME="onions"    TYPE=CHECKBOX READONLY>onions<BR>
<INPUT NAME="peppers"   TYPE=CHECKBOX READONLY>peppers
mushrooms
onions
peppers
<INPUT NAME="mushrooms" TYPE=CHECKBOX DISABLED>mushrooms<BR>
<INPUT NAME="onions"    TYPE=CHECKBOX DISABLED>onions<BR>
<INPUT NAME="peppers"   TYPE=CHECKBOX DISABLED>peppers
mushrooms
onions
peppers



Copyright 1997-2002 Idocs, Inc. Written by Miko Sullivan.

 
 
 
What is your major source of website traffic?
 
 
 
 
 
 

ADVERTISEMENT

 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2008 Broadband Media, Inc. All rights reserved.