Questions tagged [checked]

The `checked` attribute of the HTML `input` tag used to set the checked state of the control to “on” by default. Used to set the state of the `input` controls with the `type` attribute `"checkbox"` or `"radio"`.

The checked attribute of the HTML input tag used to set the checked state of the control to “on” by default. Used to set the state of the input controls with the type attribute "checkbox" or "radio".

Used to present one or more checkboxes in such a way that the state of the control at the point of page load is checked, and the user has to opt out rather than opting in, or perhaps presenting the user with a form — including a series of checkboxes — that he or she has previously filled in, and preserve the state of the selections that were made. The checked attribute allows you to set the checked state to “on” by default.

The checked attribute is also used for radio input controls. Unlike the checkbox, only one in a range of related radio inputs can be selected, and the checked attribute is used to identify which one is selected. If you accidentally mark as "checked" a number of radio inputs that share a given name attribute, the last one that’s marked as such will be selected.

Details: http://reference.sitepoint.com/html/input/checked

813 questions
24
votes
1 answer

Why does the Count() method use the "checked" keyword?

As I was looking the difference between Count and Count(), I thought to glance at the source code of Count(). I saw the following code snippet in which I wonder why the checked keyword is necessary/needed: int num = 0; using (IEnumerator
24
votes
5 answers

how do I get all checkbox variables even if not checked from HTML to PHP?

I noticed that PHP seems to return only values of checked checkboxes. I would like to see a list of checkboxes, not just values of checked checkboxes. Is there a way to detect variables of unchecked boxes? I asked because I want to be able to…
netrox
  • 5,224
  • 14
  • 46
  • 60
22
votes
1 answer

Radio Button "Checked=checked" not changing when option changed

I've created a basic 2 radio button form as seen in my example below. Observing the browser rendering, we see item 1 selected. We inspect item 1 and 2. When I click item 2, I expect item 1's checked=checked to be remove. I expect item 2 receive…
nthChild
  • 679
  • 3
  • 10
  • 19
21
votes
4 answers

Why is SQLException a checked exception

Can anyone think of a rational reason why SQLException is a checked exception? Yes, there could be a syntax error in the query Yes, the connection might have died Yes, there might be a permission problem Etc, etc blah blah blah But practically 100%…
Bohemian
  • 412,405
  • 93
  • 575
  • 722
20
votes
2 answers

Why doesn't C# use arithmetic overflow checking by default?

Possible Duplicate: Why don’t languages raise errors on integer overflow by default? Why doesn't C# use arithmetic overflow checking by default? I figure that it would generally be better to have exceptions occur when this occurs so that errors…
Sam
  • 40,644
  • 36
  • 176
  • 219
19
votes
1 answer

Android ListView CHOICE_MODE_MULTIPLE, how to set checked index?

I'm using the cool feature of the ListView to show a checkbox next to the item in the ListView. I bind my list to an array of strings. The onClick and onSelectedItem listeners get called fine, in this way I know the index of the "string" checked…
sosergio
  • 954
  • 2
  • 13
  • 25
16
votes
5 answers

What is the difference between checked and unchecked?

What is the difference between checked(a + b) and unchecked(a + b) ?
Difference Engine
  • 12,025
  • 5
  • 21
  • 11
15
votes
6 answers

Why FileNotFoundException is CheckedException?

I know FileNotFound is Checked Exception but though it is, only during the Run time this exception will occur.It is more like Arithmetic Exception(Unchecked). Whether it is checked or unchecked the exception will happen only during runtime. My…
Lathy
  • 879
  • 1
  • 8
  • 25
14
votes
4 answers

When must we use checked operator in C#?

When must we use checked operator in C#? Is it only suitable for exception handling?
masoud ramezani
  • 22,228
  • 29
  • 98
  • 151
12
votes
2 answers

Jquery Jstree checkbox events capture

I am totally new to jQuery and jstree. I am using jstree and populating the data using xml. But would like to capture event for each node whether checked or not along with their Ids. I tried using jstree's plugins API like…
user529011
  • 161
  • 2
  • 2
  • 7
12
votes
8 answers

How can I determine if a radio button is checked already?

I'm using webrat with cucumber and I would like to test if a radio button is checked already when I am on a page. How can I do that ? I didn't find any step in webrat which can do that.
Olivier
12
votes
10 answers

How to check if "Radiobutton" is checked?

I would like to make a structure with the condition (if-else) RadioButton I want that when the Radiobutton RB1 is selected, this function is active: regAuxiliar = ultimoRegistro; And when the radiobutton RB2 is selected, this function is…
11
votes
4 answers

Adding checked attribute via jQuery

I am using the following widget http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ It has worked great so far, but I need some help in adding attributes. In using Firebug, I've noticed that by simply clicking on the checkbox the…
Chris
  • 113
  • 1
  • 1
  • 5
11
votes
2 answers

How can I get a css pseudo element :checked to work in IE8 without Javascript?

I have two radio buttons, I need to set the background color on click. My code works in all browsers except for IE8. Is this possible to get this to work for IE8 without the use of Javascript?
nthChild
  • 679
  • 3
  • 10
  • 19
10
votes
4 answers

How to render an array as a list of radio buttons?

I would like to loop through an array that I define in my Javascript and render a list of radio buttons. My code which isn't working currently, and it is as follows (also on jsfiddle):
user759608
  • 101
  • 1
  • 1
  • 4
1
2
3
54 55