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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:30:46+00:00 2026-06-11T01:30:46+00:00

This is really bizarre. I am trying to submit data to the server and

  • 0

This is really bizarre. I am trying to submit data to the server and have a PHP script parse the data and then send back a response. A correctly formed URL is being sent:

http://localhost/ajax/test.html?row=rec_no_1

, but the server does not seem to respond with content from the PHP script despite a return code of 200. In fact, Developer Tools (in Google Chrome) doesn’t say anything about the PHP file. The AJAX “data” statement must be formatted properly otherwise I wouldn’t get the correct URL. POST (instead of GET) doesn’t help.

If I change the AJAX data to a string, then it works fine. This implies there is something wrong with the AJAX data. But I can’t understand what given that the URL is correctly formed and does change depending on which row I select.

Any ideas?

Here is the Javascript:

$(document).ready(function() { 
$(".submit").click(function() {

$.ajax({
        type: 'GET',
        url: 'getTable.php',
        dataType: 'html',
        data: {row: $('input[type='checkbox']:checked').val()},
        //data: {row: 'rec_no_2'},
        success: function($result) {
    $('.tableHolder').text($result);
    }
    });
    return false;
});
});

Here is the PHP code:

<?php
if (isset($_GET['row'])) {
    $tableRow = $_GET['row'];
    echo $tableRow;
}
else
        echo 'TEST';
?>
  • 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-06-11T01:30:48+00:00Added an answer on June 11, 2026 at 1:30 am

    Your syntax is incorrect:

    $('input[type='checkbox']:checked').val()
    

    You should use double quotes around checkbox:

    $('input[type="checkbox"]:checked').val()
    

    Anyway do a console.log( $('input[type="checkbox"]:checked').val() ) before the ajax call just to find out which value is being sent.

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

Sidebar

Related Questions

This seems really bizarre... I have some JSON... {firstName:David,lastName:Smith,email:null,id:0} But when I try to
hey guys having this really simple problem but cant seem to figure out have
I am having this really annoying problem on a php-site I am programming and
We're experiencing a really bizarre bug in our Rails 2.3.4 app. This bug only
This really puzzles me. I have a JTextComponent for which I've added a right-click
I'm pretty certain I'm missing something really obvious here but this seems quite bizarre.
This really confuses me, I think I'm stupid but I've searched and have done
I have this really simple c++ function I wrote myself. It should just strip
This started biting our ass on our production server really hard. We saw this
This might seem a really bizarre question, but just go with me for a

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.