Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6574491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:16:05+00:00 2026-05-25T15:16:05+00:00

I totally screwd my code and application logic by forgetting that .serialize() only gives

  • 0

I totally screwd my code and application logic by forgetting that .serialize() only gives me checked elements (checkboxes) of my form. I really need ALL elements because i have to recreate small arrays with the elements in the right order.

Let’s say i have 10 checkboxes with the id/names box1 to box10 – now only checkbox 4 and 6 are checked therefore the output is:

…&box4=on&box6=on… but I also need &box1=(whatever just unlike “on” so i can differ) and the other 8 boxes :/.

I shoudld also mention that i have input type textfields and textareas – so it’s a mixed thingy. I don’t have only checkboxes.

Any ideas?

regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:16:06+00:00Added an answer on May 25, 2026 at 3:16 pm

    don’t use .serialize(). iterate over all the checks and create the query string yourself.

    mixed solution:

    var query1='', query2=[];
    query1=$('#myForm').serialize();
    $('#myform :checkbox').not(':checked').each(function(){
        query2.push($(this).attr('name')+'=off');
    });
    query1+='&'+query2.join('&');
    

    or something like that

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Totally confused here. I have a PARENT UIViewController that needs to pass an NSMutableArray
UPDATE So totally pulled a tool moment. I really meant by reference versus Out/Ref.
I have a form that takes user message and send it to the recipient.
Totally lost with this one. Here's my code: theColor = [NSString stringWithFormat:@white]; NSLog(@%s, theColor);
I´m totally new to Powershell and wanted to write a script that deletes all
Seems totally backward to me that such an excellent IDE would hide line numbers
I am totally confused with ArrayList behavior. Wrote really long post, then realized no
Totally new to custom control creation in Silverlight. I'm wanting a custom control that
Im totally new to WCF. Trying to create a Silverlight application with WCF services.
I totally understand that in order to learn javascript I need to know how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.