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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:07:59+00:00 2026-05-26T19:07:59+00:00

i have a simple ajax post and something is going wrong. here is my

  • 0

i have a simple ajax post and something is going wrong. here is my code:

<div id="one_hundredContent"></div>
<a href="<?php echo $id; ?>" id="id"></a>
<a href="100" id="one_hundred"><div class="tab6_stats_under1">100</div></a>

and js

$('#one_hundred').live("click", function() {
var votes = $("#one_hundred").attr("href");
var id = $("#id").attr("href");
var dataString = 'id=' + id+ '&votes=' + votes;
$.ajax({
    type: "POST",
    url: "https://test.com/fileupload.php", 
    dataType: dataString ,
    success: function() {
        $('#one_hundredContent').html('success');
        }
});
return false;
});

and php

if(isset($_POST['id']) && isset($_POST['votes'])){
$tal = $_POST['id'];
$votes = $_POST['votes'];

echo $tal.' '. $votes;
die;
}

the request goes on OK:

Request URL:https://test.com/fileupload.php
Request Method:POST
Status Code:200 OK

but there is no response data, i don’t see my variables being passed on or my success message

any idea on what am i missing?

thanks

  • 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-26T19:08:00+00:00Added an answer on May 26, 2026 at 7:08 pm

    Change dataType: dataString to data: dataString

    dataType is optional, but if set should be either xml, json, script or html

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

Sidebar

Related Questions

i have this and a simple question to it. $.ajax({ type: POST, url: /,
I have the following code: jQuery: $.ajax({ url: '/personcontroller/getperson', cache: false, type: POST, data:
I have this simple jQuery ajax post to a Pyramid webapp. Ajax call: $.ajax({
I used to have a simple ajax that helped me take all items from
I have seen simple example Ajax source codes in many online tutorials. What I
I have a simple jquery/ajax request to the server which returns the structure and
I have written a simple jQuery.ajax function which loads a user control from the
I had a realtivley simple ajax application, which I have broken up to be
I have a simple jsp/servlet application and I want to add AJAX feature to
I have a simple HTML. I am using the JQuery for AJAX purpose. Now,

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.