Solved

prevent click of a checkbox

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

867 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

18 Experts available now in Live!

Get 1:1 Help Now