Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #24264

Re: Why checkbox field is not detected when the form is submitted?

Newsgroups comp.lang.javascript
Date 2014-05-19 13:01 -0700
References <149e228b-45da-4203-a4b9-6a01b089f257@googlegroups.com>
Message-ID <1e13d025-faee-46c1-a563-5b9c28a3d102@googlegroups.com> (permalink)
Subject Re: Why checkbox field is not detected when the form is submitted?
From justaguy <lichunshen84@gmail.com>

Show all headers | View raw


On Monday, May 19, 2014 3:41:28 PM UTC-4, justaguy wrote:
> The following fiddle js code for ON and OFF switch is very cool, however, the checkbox field is not included the FORM when it is submited, how come?
> 
> 
> 
> Please note, I've added name and value attributes to this checkbox.  When the form is submitted and when checkbox is set to OFF then the field and its value shows up in the FORM submission, hmm...
> 

Ok, upon reading of the entire code, I noticed that the following code block may explain why the ON state does not pass the field to the FORM:
"
input:checked::after {
    left: 0;
}
"

So, now, the revised question, how could we make either STATE (on / off) send the field and its value for FORM submission?

Thanks.

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why checkbox field is not detected when the form is submitted? justaguy <lichunshen84@gmail.com> - 2014-05-19 12:41 -0700
  Re: Why checkbox field is not detected when the form is submitted? justaguy <lichunshen84@gmail.com> - 2014-05-19 13:01 -0700
    Re: Why checkbox field is not detected when the form is submitted? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-05-19 23:55 +0200
  Re: Why checkbox field is not detected when the form is submitted? dhtml <dhtmlkitchen@gmail.com> - 2014-05-19 16:42 -0700
  Re: Why checkbox field is not detected when the form is submitted? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-05-20 07:56 +0300
  Re: Why checkbox field is not detected when the form is submitted? Denis McMahon <denismfmcmahon@gmail.com> - 2014-05-20 10:19 +0000

csiph-web