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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:08:50+00:00 2026-06-02T13:08:50+00:00

I am posting some JSON data to my action method like so: $.ajax({ url:

  • 0

I am posting some JSON data to my action method like so:

$.ajax({
        url: this.options.url,
        type: 'POST',
        dataType: 'json',
        data: values,
        success: function (html, status, response) {
            // do whatever
        },
        error: function (error) {
            // do whatever
        }
    })

I am succesfully hitting the server, with the correct values present, no errors are being thrown but yet the error event is hit up completion, not the success event. On inspecting the response object in the error event I can see that I am getting a 200 ‘OK’ back. I can also see that response text is what I would expect it to be.

I assume this is because I am posting JSON but returning text? Is it possible to have a different dataType for each direction?

  • 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-02T13:08:51+00:00Added an answer on June 2, 2026 at 1:08 pm

    The dataType property is used to signify the type of data you’re expecting in response to the call, not the type of data you’re sending, so your call is expecting a JSON response, but is getting plain text instead.

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

Sidebar

Related Questions

I'm sending an AJAX request and posting some json data to the server. How
I am posting some data using ajax. I want to manipulate that data and
I have some JQuery AJAX POSTing data to my backend C# WebForm. It POSTs
I'm having trouble posting json to a little node.js http server. Post data always
I am posting some data to the server using jquery ajax. The server spews
I'm having some problems posting JSON data to my rails controller and getting the
I'm trying to POSTing some data (a JSON string) from a php script to
I'm posting some JSON like the JSON form of {:name => hello} to my
I'm posting data to a page called process.aspx that handles some business logic with
I've been trying to get some client-server interaction happening with JSON, however, the data

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.