Solved

prevent click of a checkbox

Posted on 2013-06-14
4
343 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 33

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

772 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