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 700687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:31:34+00:00 2026-05-14T03:31:34+00:00

My code worked fine in JQuery 1.3.2, but in 1.4.2 it seems to be

  • 0

My code worked fine in JQuery 1.3.2, but in 1.4.2 it seems to be broken. What it should get in the post is something like this:

?pks=108;pks=107

What I now get is:

?pks[]=108;pks[]=107;

When I trace this code through, the JSON object seems to be fine until it enters .ajax. Firebug, after the response is received, shows the post was:

Parameters  application/x-www-form-urlencoded
pks[]   108
pks[]   107
Source
pks%5B%5D=108&pks%5B%5D=107

Which is not what I got on JQuery 1.3.2. Where are those extra braces coming from?

  • 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-14T03:31:34+00:00Added an answer on May 14, 2026 at 3:31 am

    JQuery 1.4 released a change for Nested param serialization. From their site:

    jQuery 1.4 adds support for nested param serialization in jQuery.param, using the approach popularized by PHP, and supported by Ruby on Rails. For instance, {foo: ["bar", "baz"]} will be serialized as “foo[]=bar&foo[]=baz”.

    In jQuery 1.3, {foo: ["bar", "baz"]} was serialized as “foo=bar&foo=baz”. However, there was no way to encode a single-element Array using this approach. If you need the old behavior, you can turn it back on by setting the traditional Ajax setting (globally via jQuery.ajaxSettings.traditional or on a case-by-case basis via the traditional flag).

    The [] brackets are normally used to indicate an array, and this appears to be what they are trying to make more obvious here I think (as your query-string could be read to see that one value is being overwritten by the other).

    Edit:
    I think you could probably follow their suggestion to use either:

    // Globally set it to use the old 1.3.* way of doing things.
    jQuery.ajaxSettings.traditional = true;
    
    // Enables the 1.3.* way for a single Ajax request only
    $.ajax({ data: stuff, traditional: true });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this piece of code worked fine on my machine, but it doesn't on my
The following code worked just fine thank you with one COM client, but with
This is code that worked fine on Windows XP for years. User is not
hi i have a function that worked fine using jQuery 1.3.2 but now i
I'm using jQuery Autocomplete with categories, I've used the demo code which worked fine,
This function worked fine a month ago, before the newest JQuery (1.5) came out.
I created a page to add birthday by jquery UI date-picker. It worked fine.But
I upgraded my jQuery version to 1.4 from 1.3. My code worked fine in
Following code worked fine abstract class FunctionRunnable<V> implements Runnable { protected abstract V calculate();
My code worked fine when it was all in one file. Now, I'm splitting

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.