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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:36:49+00:00 2026-05-27T11:36:49+00:00

Currently I use this code: <script type=text/javascript> $(document).ready(function() { var url = http://openexchangerates.org/latest.json; $.getJSON(url

  • 0

Currently I use this code:

<script type="text/javascript">

   $(document).ready(function() {
    var url =  "http://openexchangerates.org/latest.json";
    $.getJSON(url + "?callback=?", null,function(data) {

       var currencies = [ "USD", "EUR", "JPY", "GBP", "CHF", "AUD", "CAD", "EUR", "SEK", "HKD", "NOK", "NZD", "MXN", "SGD", "KRW", "RON", "BGN", "RUB", "PLN", "DKK" ];
       var myElementToAppendTo = $("#content");

       $.each(data.rates, function(key, value) {
         value2 = 1 / value;
         valueForEuro = value;  
         value = accounting.formatMoney(value, "", 4, ",", "."); 
         value2 = accounting.formatMoney(value2, "$", 4, ",", ".");

         euro = data.rates.EUR;
         value3 = valueForEuro / euro;
         value4 = 1 / value3;
         value3 = accounting.formatMoney(value3, "", 4, ",", "."); 
         value4 = accounting.formatMoney(value4, "&euro;", 4, ",", ".");

            if(jQuery.inArray(key,currencies) > -1) {
                myElementToAppendTo.append('<div class="currencyBox"><div class="currency">'+key+'</div><div class="tab1"><div class="half">'+value+'</div><div class="half">'+value3+'</div></div><div class="tab2"><div class="half">1 '+key+' = '+value2+' </div><div class="half">1 '+key+' = '+value4+' </div></div></div>');
            }
       });

    });
    });


</script>

It works on any browser local/server but when I build an iPhone app the JSON results do not display. Any ideas why?

  • 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-27T11:36:50+00:00Added an answer on May 27, 2026 at 11:36 am

    You need to whitelist the server you are connecting to (this can be a wildcard as well).
    This is done in your PhoneGap.plist file.
    From the Phonegap docs:

    Also, the latest code has the new white-list feature. If you are
    referencing external hosts, you will have to add the host in
    PhoneGap.plist under the “ExternalHosts” key. Wildcards are ok. So if
    you are connecting to “http://phonegap.com”, you have to add
    “phonegap.com” to the list (or use the wildcard “*.phonegap.com” which
    will match subdomains as well).

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

Sidebar

Related Questions

I use this code, but javascript is not loading. var head = document.getElementsByTagName('head')[0]; var
Basically, this is what I currently use in an included file: $sites[0]['url'] = http://example0.com;
This is the code I currently use: <% Uri MyUrl = Request.UrlReferrer; if( MyUrl
I currently use this function to wrap executing commands and logging their execution, and
I am currently trying to use this gem http://github.com/pengwynn/linkedin . Everything works fine (i.e.
Currently I use .Net WebBrowser.Document.Images() to do this. It requires the Webrowser to load
I have these lines in my html head section <script type=text/javascript src=../behaviour/location.js></script> <script type=text/javascript
Currently I use this reg ex: \bI([ ]{1,2})([a-zA-Z]|\d){2,13}\b It was just brought to my
We currently use VSS 6, this is not going to change I am afraid.
I currently use, base64_encode() to encode a user's password, this works well because it

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.