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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:41:38+00:00 2026-05-24T13:41:38+00:00

Ok so here is my problem… I am trying to read my JSON located

  • 0

Ok so here is my problem…

I am trying to read my JSON located at:

http://allencoded.com/test3.php

But this code isn’t working:

    <html>
    <head>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <title>Untitled Document</title>
    </head>

    <body>

    <script>

    $.ajax({
    url: "http://allencoded.com/test3.php",
    dataType: 'json',

    success: function (data) {

    for (var i = 0; i < data.gms.length; i++) {
        document.write("Day: " + data.gms[i].d);
    }
    }
});




    </script>

    </body>
    </html>

For the fun of it here is the JSON from my php file:

{
   "w": 1,
   "t": "PRE",
   "gms":    [
            {
         "d": "Thu",
         "gsis": 55425,
         "h": "NE",
         "vnn": "Jaguars",
         "q": "F",
         "vs": 12,
         "v": "JAC",
         "rz": -1,
         "hs": 47,
         "hnn": "Patriots",
         "t": "7:30",
         "ga": "",
         "eid": 2011081152
      },
            {
         "d": "Thu",
         "gsis": 55424,
         "h": "PHI",
         "vnn": "Ravens",
         "q": "F",
         "vs": 6,
         "v": "BAL",
         "rz": -1,
         "hs": 13,
         "hnn": "Eagles",
         "t": "7:30",
         "ga": "",
         "eid": 2011081151
      },
            {
         "d": "Thu",
         "gsis": 55423,
         "h": "SD",
         "vnn": "Seahawks",
         "q": "F",
         "vs": 24,
         "v": "SEA",
         "rz": -1,
         "hs": 17,
         "hnn": "Chargers",
         "t": "8:00",
         "ga": "",
         "eid": 2011081153
      },
            {
         "d": "Thu",
         "gsis": 55426,
         "h": "DAL",
         "vnn": "Broncos",
         "q": "F",
         "vs": 23,
         "v": "DEN",
         "rz": -1,
         "hs": 24,
         "hnn": "Cowboys",
         "t": "8:30",
         "ga": "",
         "eid": 2011081154
      },
            {
         "d": "Thu",
         "gsis": 55427,
         "h": "OAK",
         "vnn": "Cardinals",
         "q": "F",
         "vs": 24,
         "v": "ARI",
         "rz": -1,
         "hs": 18,
         "hnn": "Raiders",
         "t": "10:00",
         "ga": "",
         "eid": 2011081155
      },
            {
         "d": "Fri",
         "gsis": 55430,
         "h": "ATL",
         "vnn": "Dolphins",
         "q": "F",
         "vs": 28,
         "v": "MIA",
         "rz": -1,
         "hs": 23,
         "hnn": "Falcons",
         "t": "7:30",
         "ga": "",
         "eid": 2011081252
      },
            {
         "d": "Fri",
         "gsis": 55429,
         "h": "DET",
         "vnn": "Bengals",
         "q": "F",
         "vs": 3,
         "v": "CIN",
         "rz": -1,
         "hs": 34,
         "hnn": "Lions",
         "t": "7:30",
         "ga": "",
         "eid": 2011081251
      },
            {
         "d": "Fri",
         "gsis": 55431,
         "h": "WAS",
         "vnn": "Steelers",
         "q": "F",
         "vs": 7,
         "v": "PIT",
         "rz": -1,
         "hs": 16,
         "hnn": "Redskins",
         "t": "7:30",
         "ga": "",
         "eid": 2011081253
      },
            {
         "d": "Fri",
         "gsis": 55428,
         "h": "KC",
         "vnn": "Buccaneers",
         "q": "F",
         "vs": 25,
         "v": "TB",
         "rz": -1,
         "hs": 0,
         "hnn": "Chiefs",
         "t": "8:00",
         "ga": "",
         "eid": 2011081255
      },
            {
         "d": "Fri",
         "gsis": 55432,
         "h": "NO",
         "vnn": "49ers",
         "q": "F",
         "vs": 3,
         "v": "SF",
         "rz": -1,
         "hs": 24,
         "hnn": "Saints",
         "t": "8:00",
         "ga": "",
         "eid": 2011081254
      },
            {
         "d": "Sat",
         "gsis": 55433,
         "h": "CLE",
         "vnn": "Packers",
         "q": "F",
         "vs": 17,
         "v": "GB",
         "rz": -1,
         "hs": 27,
         "hnn": "Browns",
         "t": "7:30",
         "ga": "",
         "eid": 2011081351
      },
            {
         "d": "Sat",
         "gsis": 55437,
         "h": "CAR",
         "vnn": "Giants",
         "q": "F",
         "vs": 10,
         "v": "NYG",
         "rz": -1,
         "hs": 20,
         "hnn": "Panthers",
         "t": "8:00",
         "ga": "",
         "eid": 2011081355
      },
            {
         "d": "Sat",
         "gsis": 55434,
         "h": "CHI",
         "vnn": "Bills",
         "q": "F",
         "vs": 3,
         "v": "BUF",
         "rz": -1,
         "hs": 10,
         "hnn": "Bears",
         "t": "8:00",
         "ga": "",
         "eid": 2011081352
      },
            {
         "d": "Sat",
         "gsis": 55435,
         "h": "STL",
         "vnn": "Colts",
         "q": "F",
         "vs": 10,
         "v": "IND",
         "rz": -1,
         "hs": 33,
         "hnn": "Rams",
         "t": "8:00",
         "ga": "",
         "eid": 2011081353
      },
            {
         "d": "Sat",
         "gsis": 55436,
         "h": "TEN",
         "vnn": "Vikings",
         "q": "F",
         "vs": 3,
         "v": "MIN",
         "rz": -1,
         "hs": 14,
         "hnn": "Titans",
         "t": "8:00",
         "ga": "",
         "eid": 2011081354
      },
            {
         "d": "Mon",
         "gsis": 55438,
         "h": "HOU",
         "vnn": "Jets",
         "q": "P",
         "vs": 0,
         "v": "NYJ",
         "rz": -1,
         "hs": 0,
         "hnn": "Texans",
         "t": "8:00",
         "ga": "",
         "eid": 2011081551
      }
   ],
   "y": 2011,
   "gd": "0"
}

I am not sure why this isn’t working at all. Any ideas? Thanks!

  • 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-24T13:41:38+00:00Added an answer on May 24, 2026 at 1:41 pm

    document.write should be used only before the page ends loading. You are using it in an Ajax callback.

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

Sidebar

Related Questions

I'm trying to solve the problem here but I don't know why my code
I'm facing a problem here, with HttpListener. When a request of the form http://user:password@example.com/
here is problem about sum of factorial of digit http://projecteuler.net/index.php?section=problems&id=254 also here is Define
PROBLEM: Here's the code: import matplotlib.pyplot as plt plt.bar([1,2],[5,4]) plt.title('this is a very long
Maddening problem here. When my page loads: <body onload=getClientDateTime();> It runs this function: document.getElementById('ClientDateTime').value=hello
What is the problem here? (Besides having redundant code). $.getJSON works as expected. However
I have an interesting problem here I've been trying to solve for the last
Here the problem: the layer gets sucessfully hidden, but when I click the button
The problem here is pretty self-evident from the resulting JSON array at the bottom.
Here is problem I'm trying to solve. It's for logistics company. I got all

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.