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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:17:11+00:00 2026-05-30T01:17:11+00:00

I have asked a question regarding invalid label on firebug which happens when I

  • 0

I have asked a question regarding invalid label on firebug which happens when I try to retrieve data from my restful web service. Most of the answers I received was about setting a callback function. but I can’t seem to get the right juice from it. can you show me an exact code on how to do it? or atleast correct the code here:

        type: "GET",
        cache: false, 
        contentType: "application/json; charset=utf-8",
        dataType: "jsonp",
        processdata:true,
        jsonp: false, jsonpCallback: "success",
        url: 'http://localhost:8732/Service1/data/10',

        success : function success(data) {
            jsonResponse = eval("(" + data + ")");
            alert(jsonResponse)
        },
        error : function(req,status, ex) {

            alert(ex);
        }

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-30T01:17:12+00:00Added an answer on May 30, 2026 at 1:17 am

    Wow, you’ve got a lot of unnecessary stuff there. Try this:

    $.ajax({
        url: 'http://localhost:8732/Service1/data/10',
        dataType: 'jsonp',
        error: function(req, status, ex) {
            // your code here
        },
        success: function(data) {
            //your code here
            // Please note: you don't need to 'eval' the json response.
            // The 'data' variable will be loaded with the object that the json string represents.
            // By the way, don't use 'eval', ever.
        }
    });
    

    jQuery will take care of the callback on the url. See here: http://api.jquery.com/jQuery.ajax/

    UPDATE
    Why jsonp? If you’re getting this from localhost, why not just json? As discussed in the comments below, your server currently is not capable of a jsonp response, but it can do json.

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

Sidebar

Related Questions

I've recently asked a question regarding best ways of separating business logic from data
This stems from a previous question I asked regarding code metrics. I have been
I asked a question regarding Bi linear transformations and received this answer: From that
I know a lot of question regarding VB6 migration have been asked, but I
I asked this question earlier but regarding another programming languages. Let's say I have
This question is related to others I have asked on here, mainly regarding sorting
I have just asked a question on SuperUser regarding Microsoft Excel. Thankfully someone answered
I previously asked a question regarding this , got an interesting answer which got
I have a classifieds website, and I just asked a question regarding if I
There have been some similar questions asked regarding Grid views, but none have been

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.