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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:57:16+00:00 2026-05-23T12:57:16+00:00

Me again, Trying to learn some jQuery stuff. Now I’m building an AJAX search

  • 0

Me again,

Trying to learn some jQuery stuff. Now I’m building an AJAX search engine. AJAX request should depend on the checkboxes values.

I have multiple groups of checkboxes: band[], genere[] and type[]. However I’m stuck with sending proper AJAX request to the PHP script.

My code:

$("input.filter").click(function() {        
    if( $("input.filter:checked").length )
        sendRequest('type=ajax&target=display&' + $("input.filter").serialize());
    else
        sendRequest('type=ajax&default=true&target=display')
});

Issue: It’s not working on checking ant checkbox, it works when the second checkbox is selected or when checkbox is unchecked. Generally, very buggy.

Can anybody provide suggestions or proper function name that can help me solve this issue?

My checkboxes looks like this one:
<input type="checkbox" name="band[]" class="filter" value="blind guardian" />

  • 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-23T12:57:17+00:00Added an answer on May 23, 2026 at 12:57 pm

    The square brackets [] are needed for multiselect, it is good that way.

    Your serialized string should be working server side, like an array:

    key[]=A&key[]=B&key[]=C
    

    would be:

    Array (
        0 => "A",
        1 => "B",
        2 => "C"
    )
    

    There must be something else, if it does not work.
    What is the main problem, you experience:

    • click handler won’t fire?
    • serialize create bad data?
    • bad ajax response?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn some jQuery, and I setup a test page with the
I need your help again :) I'm trying to do a plugin with jQuery
Hey all, i am trying to learn how to insert a comment within some
I need help again with some regular expressions I'm trying to do (still under
I'm relatively new to TDD, and still trying to learn to apply some of
I have some downtime and I'm spending it trying to learn SQL. I've run
Again, I am a java n00b and I am trying to learn from scratch
I am trying my best to learn AJAX and passing these php variables through
I'm new to jquery but I'm trying to learn. I'm working with a drop
I'm new to jquery but I'm trying to learn. I'm working with a drop

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.