Solved

prevent click of a checkbox

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

860 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