www.webdeveloper.com
Results 1 to 4 of 4

Thread: [RESOLVED] Loading data into table

  1. #1
    Join Date
    Dec 2013
    Posts
    3

    resolved [RESOLVED] Loading data into table

    i'm making a facebook application and could use some help starting it since i don't know much about ajax/js.

    this is what i'm trying to do (i hope it makes sense):
    1. request link to PHP page with JSON code in the body
    2. take those items and put them into an array inside the script
    3. load those links from array in background while displaying their icon in a 5x5 html table
    4. when all of the pages loading in the background are done, display an image below the icon in the table
    5. repeat these steps without refreshing the page as soon as all pages are fully loaded.

    this is what the page looks like with the JSON code that i need to load (there can be up to 25 picture/link combos):
    Code:
    [
       {
         "picture":"URL_TO_PICTURE",
         "link":"URL_TO_SITE"
       },
       {
         "picture":"URL_TO_PICTURE",
         "link":"URL_TO_SITE"
       },
       {
         "picture":"URL_TO_PICTURE",
         "link":"URL_TO_SITE"
       }
    ]
    here's a sample of what i need the data to load into: http://puu.sh/5Qvj7.png

    so pretty much what i need to do is get the JSON string from a PHP file, put it into an array, loop through the array while adding the data to the table, wait until they're all done loading, then do it all over again.

    if somebody could help me out with this, i'd greatly appreciate it. thank you.

  2. #2
    Join Date
    Dec 2013
    Posts
    3
    actually, the data doesn't need to be loaded into the 5x5 table. it can be done like this:

    [image0 from array]
    [image when done loading]

    [image1 from array]
    [image when done loading]

    [image2 from array]
    [image when done loading]

    and so on.

  3. #3
    Join Date
    Dec 2013
    Posts
    3
    nevermind. i can't do what i wanted to do anyway.

  4. #4
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,500
    Ok then, if you can't do what you want, perhaps you can mark the thread as resolved then...
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles