Comments on: 3 Value Checkbox http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Jason http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-11838 Fri, 20 Mar 2009 19:52:43 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-11838

I would have started with a set of three like-named radio buttons as your original HTML. This would allow the fallback (no JS) to support the proper functionality of submitting 3 distinct states. Just replace the set of radio buttons with your current solution onload for the desired behavior. Reducing functionality of devices that don’t support (or have disabled) JavaScript should only be a worst-case scenario. In this case, there is a better fallback solution.

Reply  |  Quote
]]>
By: Matthias Willerich http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-10730 Wed, 19 Nov 2008 09:10:07 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-10730

A nice-to-have would be to use the labels as they would work with a regular checkbox (as in: they’re a click target, too).

Reply  |  Quote
]]>
By: Ruthi http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-9742 Thu, 31 Jul 2008 13:13:07 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-9742

Grate Job!
I found a small bug in function replaceChecks()
lines:
else if(inputs[i].value = 1 ) &&
else if(inputs[i].value = 2 )
should chnage to:
else if(inputs[i].value == 1 ) &&
else if(inputs[i].value == 2 )

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-9505 Tue, 01 Jul 2008 17:45:36 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-9505

Thanks for the tip Mx!

Reply  |  Quote
]]>
By: Mx http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-9504 Tue, 01 Jul 2008 17:31:39 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-9504

Why are you using “label” if you don’t use ID attribute in “input”. “label” works with ID *not* NAME attribute.
Now, if we fix this error, and if we click on the text label, the checkbox internal state can be unchecked by the user and checkbox value is no more sent by the brower.
It’s very easy to test by adding this php line: print_r($_POST);

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-9173 Thu, 29 May 2008 13:32:45 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-9173

[quote post=”2322″]Have you really never seen disabled form elements?[/quote]

No, I’ve seen them. It’s just that the value of a disabled checkbox is not sent when the form is submitted. So a disabled box is virtually indistinguishable from an un-checked box when you examine the POST arguments.

What I needed to do was to capture 1 out of 3 distinct states. So yeah, it makes perfect sense until you actually sit down and try to implement it this way.

Oh, and if you were wondering why I didn’t just “style” the checkboxes with CSS it’s because it’s virtually impossible to do so. Most browsers gleefully ignore any styles applied to check-boxes and radio buttons.

So this is really not as insane as it looks like. It’s just hard to see the method in our madness from the outside sometimes. ;)

Reply  |  Quote
]]>
By: what http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-9172 Thu, 29 May 2008 11:34:47 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-9172

Also, when something is ‘half’ selected – if you select multiple files in windows, and set the read only attribute for instance… it will be clear, you can check it, and then make it clear.

If some are read only and others not, then the initial state will be half shaded. You can then clear or check it, or again half shade it.

But your ‘No, just one. But with N/A option.’ means a disabled checkbox.

your captcha uses shell commands, how awesome

Reply  |  Quote
]]>
By: what http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-9171 Thu, 29 May 2008 11:31:23 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-9171

Are you insane?

Have you really never seen disabled form elements?

NO REALLY

wtf.

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-8611 Thu, 27 Mar 2008 13:54:23 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-8611

Ah, so that the dotted thing means. :) Thanks!

Reply  |  Quote
]]>
By: BTM http://www.terminally-incoherent.com/blog/2008/03/05/3-value-checkbox/#comment-8610 Thu, 27 Mar 2008 12:30:55 +0000 http://www.terminally-incoherent.com/blog/2008/03/04/3-value-checkbox/#comment-8610

what is the difference between the ckeck and the square in the Filezilla?

checked – set the permission (changes permissions)
unchecked – remove the permission (changes permission)
dotted (? :P) – do not modiffy the permissions (dosn’t change the permission)

Reply  |  Quote
]]>