Miscellaneous Form Field Attributes

 <  Day Day Up  >  


The HTML 4 specification added two other attributes to certain form controls: disabled and readonly . When the disabled attribute is present in a form control element, it turns off the field. Disabled elements will not be submitted, nor may they receive any focus from the keyboard or mouse. The browser might also gray out the disabled form. The point of the disabled attribute might not be obvious, but imagine being able to disable the form submission button until the appropriate fields have been filled in. Of course, the capability to dynamically turn the disabled attribute for a form control on or off requires scripting support that not all browsers have.

When the readonly attribute is present in a form control element, it prevents the control's value from being changed. A form control set to readonly can be selected by the user but cannot be changed. Selection might even include the form control in the tabbing order. Unlike disabled controls, the values of read-only controls are submitted with the form. You can think of a read-only form control as a visible form of <input type="hidden"> . According to the HTML specification, the readonly attribute is defined for the <input type="text"> , <input type="password"> , and <textarea> tags, but in practice many browsers support the other fields such as pull- downs , radios, and check boxes. Like a disabled form control, read-only controls can be changed only through the use of a script.

Table 12-2: vCard Attribute Values

vCard.Cellular

vCard.Company

vCard.Department

vCard.DisplayName

vCard.Email

vCard.FirstName

vCard.Gender

vCard.Home.City

vCard.Home.Country

vCard.Home.Fax

vCard.Home.Phone

vCard.Home.State

vCard.Home.StreetAddress

vCard.Home.Zipcode

vCard.Homepage

vCard.JobTitle

vCard.LastName

vCard.MiddleName

vCard.Notes

vCard.Office

vCard.Pager

vCard.Business.City

vCard.Business.Country

vCard.Business.Fax

vCard.Business.Phone

vCard.Business.State

vCard.Business.StreetAddress

vCard.Business.URL

vCard.Business.Zipcode

 


 <  Day Day Up  >  


HTML & XHTML
HTML & XHTML: The Complete Reference (Osborne Complete Reference Series)
ISBN: 007222942X
EAN: 2147483647
Year: 2003
Pages: 252
Authors: Thomas Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net