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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:03:09+00:00 2026-05-31T14:03:09+00:00

I am trying to develop a mobile application using JQUERY mobile. For its data,

  • 0

I am trying to develop a mobile application using JQUERY mobile. For its data, my app needs to accesses an existing service that returns a JSON object.

    $.ajax({
            url: 'http://pruebanico.comze.com/prueba2.json',     
            dataType: 'text',    
            jsonp: 'jsoncallback', 
            timeout: 5000,     
            success: function(json, status){

            alert (json);
            });

When executing this piece of code, an undefined error is displayed.

Having a closer look at the result of the returned page in Firebug, it seems to be that everything is OK json-wise

 {"totalResultsCount":0,"geonames":[]}

What can be the problem of the undefined error?

  • 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-31T14:03:10+00:00Added an answer on May 31, 2026 at 2:03 pm

    The first problem is that you’ve got a syntax error. You haven’t closed the same amount of parentheses/braces as you opened. It should be this:

    $.ajax({
        url: 'http://pruebanico.comze.com/prueba2.json',
        dataType: 'text',
        jsonp: 'jsoncallback',
        timeout: 5000,
        success: function(json, status) {
            alert(json);
        }
    });​
    

    The second problem seems to be that your server doesn’t return JSONP but just plain JSON, which results in a cross-origin exception.

    You need to fix your server code to instead return something like

    jsoncallback({"totalResultsCount":0,"geonames":[]})
    

    OR

    Implement CORS (cross-origin resource sharing) on your server, but note that the current releases of Opera and Internet Explorer don’t yet support the standard version of CORS. (IE has its own XDomainRequest object but it’s different to the CORS standard. The next release of both browsers will ship with standard CORS support though.)

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

Sidebar

Related Questions

I am trying to develop an iPhone app using PhoneGap and jQuery Mobile. This
I am trying to develop a mobile app, that registered with a Java program
I am trying to develop a mobile application using J2ME to detect the device
I am trying to develop a TCP client that runs on mobile devices using
I am trying to develop a mobile app using Sencha touch .I need to
im trying to develop an app for a win CE mobile device that downloads
I am trying to develop a mobile application which can interact with a MOSS
I'm trying to develop an application that will use getImageData in javascript in Firefox
I am trying to develop a mobile version of my web application and I
I am trying to develop a Windows Mobile 6 (in WF/C#) application. There is

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.