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

The Archive Base Latest Questions

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

Having this code when running it on firebug, in the console it will show

  • 0

Having this code when running it on firebug, in the console it will show invalid label and also my success callback doesn’t fire. after fiddling my way to google about answers i found out that when using jsonp i need to parse the result and also i need to have a callback. Now i’m banging my head against the wall looking for possible answers. Can you help me with this one? THANKS.

    $.ajax( {
        url: 'http://localhost:8732/Service1/data/10',
        type: "GET",
        contentType: "application/json; charset=utf-8",
        dataType: "jsonp",
        processdata:true,
        jsonpCallback: 'mycallback',
        success : function(data) {

           var json = $.parseJSON(data);
           $('#items').html(json);
           alert(json);

        },
        error : function(req, status, ex) {

          alert("Lol" + ex);

        }
        });
      }

Also the alert("Lol"+ex) will prompt LoljQuery16403233689395911671_1329386795307 was not called”

  • 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:54:53+00:00Added an answer on May 30, 2026 at 1:54 am

    jsonpString

    Override the callback function name in a jsonp request. This value
    will be used instead of ‘callback’ in the ‘callback=?’ part of the
    query string in the url. So {jsonp:’onJSONPLoad’} would result in
    ‘onJSONPLoad=?’ passed to the server. As of jQuery 1.5, setting the
    jsonp option to false prevents jQuery from adding the “?callback”
    string to the URL or attempting to use “=?” for transformation. In
    this case, you should also explicitly set the jsonpCallback setting.
    For example, { jsonp: false, jsonpCallback: “callbackName” }

    jsonpCallbackString, Function

    Specify the callback function name for a JSONP request. This value
    will be used instead of the random name automatically generated by
    jQuery. It is preferable to let jQuery generate a unique name as it’ll
    make it easier to manage the requests and provide callbacks and error
    handling. You may want to specify the callback when you want to enable
    better browser caching of GET requests. As of jQuery 1.5, you can also
    use a function for this setting, in which case the value of
    jsonpCallback is set to the return value of that function

    Code Sample:

    <!DOCTYPE html>
    <html>
    <head>
      <style>img{ height: 100px; float: left; }</style>
      <script src="http://code.jquery.com/jquery-latest.js"></script>
    </head>
    <body>
      <div id="images">
    
    </div>
    <script>
    $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?",
      {
        tags: "cat",
        tagmode: "any",
        format: "json"
      },
      function(data) {
        $.each(data.items, function(i,item){
          $("<img/>").attr("src", item.media.m).appendTo("#images");
          if ( i == 3 ) return false;
        });
      });</script>
    
    </body>
    </html>
    

    References : http://api.jquery.com/jQuery.getJSON/

    Edit : Code 2

    $.ajax({
        url: 'http://server:port/path/to/file',
        type: 'GET',
        dataType: 'jsonp',
        cache: false,
        jsonp: '$callback',
        error: function (x, t, r) { alert(x.response.message); },
        success: function (data) {
            $.each(data.d.results, function (i, val) {
                $("#results").append("<div>" + val.name + "</div>");
            });
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem. I have this code: setInterval(function() { $.ajax({ url: url, success:
i'm having a problem running an sql in ms-access. im using this code: SELECT
Having this code: using (BinaryWriter writer = new BinaryWriter(File.Open(ProjectPath, FileMode.Create))) { //save something here
Having this code... var b = new ReadOnlyCollection<int>(new[] { 2, 4, 2, 2 });
I'm having trouble with this code: NSRect itemFrame; id item; // code to assign
I've been having problems with this code I had spent the last 3 hours
When declaring a template, I am used to having this kind of code: template
I am having some trouble with this code . The problem is when i
I'm having a hard time using std::string::iterators in C++. This code compiles fine (still
as all you know $(#ID) returns the element having ID. but this code always

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.