Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Put the check box in the "read only" state

Status
Not open for further replies.

Bibi

Programmer
Nov 8, 2000
10
CA
I have a form containing text input fields, dropdownlists (combo boxes) and check boxes. I want that they are in "read only" state. I use the property "disabled" to prevent from changing the data. However, the interior of the check boxes becomes gray. By using the property "background" of the check box, the interior of the check box is always gray because it is the background of the outside of the check box which changes color. How can I put the check box in the "read only" state without changing the background color of the check box?
 
use onfocus()=blur
this is to prevent the user to focus on the checkbox so he won't be able to check or uncheck it
this is the only way i know, apart from disabling it, but disabling has 2 drawbacks : the gray background and it's ie only
 
also, you will have to return false from in the function you call from the onclick handler. otherwise it will be checked anyways jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top