Solved

prevent click of a checkbox

Posted on 2013-06-14
4
348 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
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 to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

726 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