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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:37:46+00:00 2026-05-27T03:37:46+00:00

I got some problem in JSONP result can somebody give me the idea how

  • 0

I got some problem in JSONP result can somebody give me the idea how to reformat the JSONP .responseText result into correct JSON format.

var result = ''
$.fn.ajaxUse = function(fullurl){
    result = $.ajax({
      dataType: 'jsonp',
      data: 'id=test',
      jsonp: 'callback_jsonp',
      url: fullurl,
      success: function(data){},
      error: function(xhr){
        alert(xhr.responseText);
      },
      async: false
    }).responseText;
}

$.fn.ajaxUse(ajaxurl+'menu.php');
alert(result);

When I use the above code and try to return JSON result I got the result as follow. Can somebody answer me how can I parse the result in JSON format, I use parseJSON already and not working. I would like to remove jQuery17018127539248006552_1322568664691 from following result and would like to get correct JSON only.

jQuery17018127539248006552_1322568664691({"lang":{"1":"Organization Information","2":"Project List","3":"Project Details","4":"Advanced Search","5":"Layers List"}});
  • 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-27T03:37:47+00:00Added an answer on May 27, 2026 at 3:37 am

    I think result is getting set to the return value of your ajaxUse function rather than the JSON that gets returned from your URL. Try –

    var result = '';
    $.fn.ajaxUse = function(fullurl){
        $.ajax({
          dataType: 'jsonp',
          data: 'id=test',
          jsonp: 'callback_jsonp',
          url: fullurl,
          success: function(data){
            result = data;
          },
          error: function(xhr){
            alert(xhr.responseText);
          },
          async: false
        }).responseText;
    }
    
    $.fn.ajaxUse(ajaxurl+'menu.php');
    alert(result);
    alert(result.lang[1]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi got a weird problem parsing JSON for some reason can't access the values
I have some problem with JSON parsing. When I hit URL, I've got JSON
Ok, Ive got a Java Servlet returning some JSON (In Application/JSON format). To do
I have some problem with Jquery Autocomplete plugin ( http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ ) I got it
I've got some tabs. http://img196.imageshack.us/img196/7167/tabs.gif And I want to add a rollover effect. Problem
I've got a K-nearest neighbour problem where some of the dimensions are closed loops.
I've got following problem: (c#) There is some class (IRC bot), which has method,
Got a math calculation problem. $a = 34.56 $b = 34.55 $a do some
i`ve got a little problem with LINQ. I read out some information via XML-RPC.
I've got stuck in a problem with gflags when trying to find some memory

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.