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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:58:29+00:00 2026-06-14T10:58:29+00:00

I am using ajax call’s to perform POST and GET operations from a WebService

  • 0

I am using ajax call’s to perform POST and GET operations from a WebService hosted on some server.

I am using dataType:”jsonp” due to the cross domain issue.I can see the data being sent by the web service on fiddler. I want to access the data which I get from the service and I dont know how do do that.

This is my ajax call:

    $.ajax({
        type: method,
        url: "url",
        contentType: "application/json; charset=utf-8",
        dataType: "jsonp",
        jsonp: false,
        jsonpcallback:function(data){},            //What am I supposed to write here so that I can get the JSON data from Padded json
        success: successHandler,
        error: errorHandler
    });

This is the approximation of the json response that I receive from the service:

    {"Ideas":[
               {"Message":null,"IdeaId":1},
               {"Message":null,"IdeaId":1}
             ]
    }  

Any kind of help will be greatly appreciated. I searched through a lot of posts but could not get through.

Thank you in advance.

  • 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-14T10:58:30+00:00Added an answer on June 14, 2026 at 10:58 am

    jsonpcallback:function(data){}, //What am I supposed to write here so that I can get the JSON data from Padded json

    Usually, nothing. You only need to specify the callback if your JSONP service is really atypical. If you do specify it, it needs to be a string.

    Likewise you shouldn’t set jsonp: false as that will prevent the callback parameter being generated.

    You do need a success handler to handle the data though. Having an error handler is also a good idea.

    function successHandler(data) {
        console.log(data)
    }
    
    function errorHandler(jqXHR, errorType, exception) {
        console.log(errorType, exception);
    }
    
    $.ajax({
        url: "url", // Make this the real URL!
        dataType: "jsonp",
        success: successHandler,
        error: errorHandler
    });
    

    Then the JSONP handler needs to actually return JSONP

    The Content-Type header returned by the server should be application/javascript

    The body should be:

    • The value of the callback key in the query string
    • (
    • Some JSON
    • );

    e.g.

    jqueryCallback123u54yiyioeuioey8({ "foo": "bar" });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a jQuery ajax call to get several entries from a large set
I am using $.ajax call for download excel from .aspx page. But ajax throwing
I am trying to invoke webservice using jquery ajax call. I am using jasonp
I'm using jQuery to make an Ajax call using an Http Post in ASP.NET
I am trying to perform a nested AJAX call using the following code. The
I am trying to make an ajax call using $.get() where I want to
I make an ajax call to a servlet's post method from my js file.
I'm using ajax call to send a message from my contact form. However, I
I am using Datatables and filling the data using Ajax from server side. I
here is my ajax call // send the data to the server using .ajax()

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.