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

  • Home
  • SEARCH
  • 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 3353270
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:07:51+00:00 2026-05-18T02:07:51+00:00

I wrote a jquery code to send values to a php file $(‘#def_formSubmit’).live("click",function(){ var

  • 0

I wrote a jquery code to send values to a php file

$('#def_formSubmit').live("click",function(){

        var query_string = '';
                    
                    $("input[@type='checkbox'][@name='assotop']").each(
                        function()
                        {
                            if(this.checked)
                            {
                                query_string += "&assotop[]=" + this.value;
                            }
                        });

    
    var def_tags = $("#tags").val();
    
    var dataString = 'def_tags='+ def_tags + query_string  ;

    $.ajax({
        type: 'POST',
        url: 'post.php',
        data: dataString,
        cache: false,
        beforeSend: function() {
            $("#QRresult").html("<img src='images/loading.gif' />");
        },
        success: function(data5) {
            $("#QRresult").html(data5);
        }
    });
    return false;
});
    

But it does not work and does not sendi checkbox values to my php file.

I think this way of getting checkbox values is a old approach and not working for jquery 1.4.

  • 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-18T02:07:52+00:00Added an answer on May 18, 2026 at 2:07 am

    Remove the @ from your selector. This changed as of 1.3

    $("input[@type='checkbox'][@name='assotop']").each(
    

    should be:

    $("input[type='checkbox'][name='assotop']").each(
    

    You could also do:

    $("input:checkbox[name='assotop']").each(
    

    EDIT: Added input to the selector as noted by @lonesomeday.

    EDIT: I guess I’d use the one with input[type='checkbox'] so that querySelectorAll will be used in browsers that support it.

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

Sidebar

Related Questions

I want to make a POST request to my Controller with jquery. function Send()
I've got a Jquery function that I wrote which blacks out the screen after
I've got a Jquery function that I wrote which blacks out the screen after
I'm trying to debug some code that another developer wrote in jquery since page
Alright, so I have some jQuery code that will send an AJAX request to
let's say I have this code in javascript: function doAnAjaxCall () { var xhr1
I wrote a simple batch file as a PowerShell script, and I am getting
I am trying to create a go-moku game using jquery,php, and mysql database. I
For a site I'm building, I import my Jquery code from... http://jqueryjs.googlecode.com/files/jquery-1.3.2.js ...but when
I've been having some issues with a pagination widget that I wrote in jQuery.

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.