Solved

prevent click of a checkbox

Posted on 2013-06-14
4
339 Views
Last Modified: 2013-06-18
I want to prevent the  clicking of a checkbox without disabling it.   I'm using the checkbox for display purposes only, to show a yes or no value, and I do not want the gray effect that disabling causes.

How can I do this?
0
Comment
Question by:HLRosenberger
4 Comments
 
LVL 32

Expert Comment

by:Big Monty
ID: 39249008
<input type="checkbox" onclick="this.blur();" />
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39249236
Just use an image of a checkbox.  You just need one that is checked and one that is not.  If you actually are submitting it, then just put the value in a hidden field and it will submit with the rest of the form.

Cd&
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 39255919
READONLY doesn't work on checkboxes as it prevents you from editing a field's value

http://stackoverflow.com/questions/155291/can-html-checkboxes-be-set-to-readonly
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 39256353
Yes!  Thanks!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now