Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Read-Only Fields - Displaying as Disabled - CSS

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: Thu, Jul 21, 2011, 1:50 PM


To style read-only fields to look like they're disabled, use the following CSS.

{copytext|css}
input[readonly] {
    color: graytext;
    background: buttonface;
}

In addition, because the READONLY attribute doesn't apply to SELECT elements, they can be "locked" via some jQuery in their ONCHANGE attribute, as follows.