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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:53:15+00:00 2026-06-09T22:53:15+00:00

I am testing getting some json and the json code actually shows on my

  • 0

I am testing getting some json and the json code actually shows on my Android but when I try it on my iPhone it won’t work.

Is there anything extra that needs setting for IOS ?

Here is the code:

<!DOCTYPE html> 
<html> 
    <head> 
    <title>JSON Test</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/jquery.mobile-1.1.1.min.css" />
    <script src="js/jquery-1.7.1.min.js"></script>
<script>
    $('#page1').live("pageinit", function () {
        $.getJSON("http://mysite.com/api/get_cats", function (data) {
            var output = '';    
            $.each(data.cats, function (index, value) {
                output += '<li>' + value.title + '</li>';    
            });
            $('#listview').append(output).listview('refresh');
        });
    });
</script>
<script src="js/jquery.mobile-1.1.1.min.js"></script>

</head> 
<body>     
<div id="page1" data-role="page">    
    <div data-role="header">
        <h1>Page Title</h1>
    </div><!-- /header -->    
    <div data-role="content">   
        <p>Page content goes here.</p>              
        <ul id="listview"></ul>             
    </div><!-- /content -->    
    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->    
</body>
</html>

If I add an alert: alert(data.cats); I get “index.html [object: Object]” in the iphone”

Any ideas anyone?

  • 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-09T22:53:16+00:00Added an answer on June 9, 2026 at 10:53 pm

    Do you have that domain whitelisted ?

    It’s in config.plist…while on android it’s in cordova.xml

    See http://docs.phonegap.com/en/2.0.0/guide_whitelist_index.md.html#Domain%20Whitelist%20Guide

    EDIT:
    You can alert things from respons jqxhr object as well to find out more. As a response function add another two parameters

        function(data, textStatus, jqXHR){...}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am testing out some code and I have created a json file with
I have some JavaScript code that is supposed to run on document.ready but I
This is an error that my friend is getting when testing my app, but
Ok - so I am testing a web application and am getting some strange
I'm relatively new to testing and still getting my head around some of the
I'm just getting into unit testing, and have written some short tests to check
I am trying to send a JSON file to do some testing. I have
I am getting some very interesting results when testing an app developed with MonoDroid
I'm testing out a basic Rails app and I seem to be getting some
I'm doing some performance testing against an Apache server and getting the dreaded message

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.