Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery Mobile JSON Not Loading on certain browsers
    primarykey
    data
    text
    <p>So basically, I have a $.getJSON call that seems to be working on Chrome and iPhone 4S Safari browsers, but not working on a bunch of other ones, including the iPad 2 Safari. I created a dialog box within the pageinit method and this showed up on all browsers. I changed my code so after the JSON call it creates a dialog with one of the data fields of the JSON. It shows up fine on Chrome but the whole JSON call seems to be ignored (b/c of the silent fail of the method) on the iPad. So, I think there's a problem with the JSON url, but I'm not sure. The url of the page is <a href="http://www.shivamthapar.com/sportsapp/baseball-boys.php" rel="nofollow">www.shivamthapar.com/sportsapp/baseball-boys.php</a> and the json file url is <a href="http://www.shivamthapar.com/sportsapp/src/json/baseball.json" rel="nofollow">www.shivamthapar.com/sportsapp/src/json/baseball.json</a> .Here's my code: </p> <p>Javascript:</p> <pre><code>$("#main").live('pageinit', function(event) { getList(); }); function getList(){ $.getJSON('../src/json/baseball.json', function(data) { alert(data.super[0].levels[0].games[0].versus); }); } </code></pre> <p>JSON:</p> <pre><code>{ "super": [ { "gender": "boys", "levels": [ { "level": "varsity", "games": [ { "versus": "Fullerton", "homeaway": "Home", "month": "September", "date": "27", "year": "2012", "time": "3:00", "ampm": "pm", "troyscore": 32, "vsscore": 41 }, { "versus": "Sunny Hills", "homeaway": "Away", "month": "March", "date": "28", "year": "2012", "time": "2:00", "ampm": "pm", "troyscore": "20", "vsscore": "17" } ] }, { "level": "jv", "games": [ { "versus": "Sonora", "homeaway": "Home", "month": "January", "date": "20", "year": "2012", "time": "3:00", "ampm": "pm", "troyscore": "15", "vsscore": "21" }, { "versus": "Valencia", "homeaway": "Away", "month": "April", "date": "30", "year": "2012", "time": "4:00", "ampm": "pm", "troyscore": "40", "vsscore": "1" } ] } ] }, { "gender": "girls", "levels": [ { "level": "varsity", "games": [ { "versus": "Acacia", "homeaway": "Home", "month": "February", "date": "27", "year": "2012", "time": "7:00", "ampm": "pm", "troyscore": "32", "vsscore": "41" }, { "versus": "LV", "homeaway": "Away", "month": "March", "date": "28", "year": "2012", "time": "3:30", "ampm": "pm", "troyscore": "20", "vsscore": "17" } ] }, { "level": "jv", "games": [ { "versus": "Commonwealth", "homeaway": "Home", "month": "January", "date": "20", "year": "2012", "time": "5:00", "ampm": "pm", "troyscore": "15", "vsscore": "21" }, { "versus": "Xishan", "homeaway": "Away", "month": "April", "date": "30", "year": "2012", "time": "4:00", "ampm": "pm", "troyscore": "40", "vsscore": "1" } ] } ] } ] } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload