Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Processing checkboxes data.

 
ashlan cooper
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there, I'm trying to process the data in form I created.
this is my code


but I have a question in retrieving the data from the checkboxes. How do I implement what the user has selected into the if statement.

Thanks in advance.
 
Marek Krzeminski
Greenhorn
Posts: 14
C++ Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd use JavaScript to process the user's response.

I use the jQuery framework to make writing JavaScript easier. With it you could do something like:

$( "form input:checkbox").each( function() {
//do what ever you need here per check box object
}
 
Are you okay? You look a little big. Maybe this tiny ad will help:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!