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

  • Home
  • SEARCH
  • 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 7605691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:13:52+00:00 2026-05-31T00:13:52+00:00

My data from getmovies.php is working correctly and loading into #moviesPage the FIRST time

  • 0

My data from getmovies.php is working correctly and loading into #moviesPage the FIRST time I load the page. However, if I navigate away from #moviesPage and then return to it the content does not reload. The header and footer appear and I can see that the unpopulated <ul> is also there, just not any of the dynamically loaded <li>s.

My code is below. Any thoughts on how I can get my dynamic data to load when I return to a page?

$( '#moviesPage' ).live( 'pagebeforecreate',function(event){
  getMoviesList();
});

function getMoviesList() {
  $.getJSON(serviceURL + 'getmovies.php', function(data) {
    $('#moviesList li').remove();
    movies = data.items;
    $.each(movies, function(index, movie) {
      $('#moviesList').append('<li>' +
      '<img src="posters' + movie.poster + '"/>' +
      '<div class="movie-toprow"><h4>' + movie.title + '</h4>' +
      '</li>').listview('refresh');
        });
    });
}

I’m using jQuery Mobile 1.1.0-rc.1, but was having the same issue with 1.0.1. This is for a mobile app that will be used on iOS, Android, and other mobile platforms.

BONUS: For now I just want the content to reload. However, eventually I would like to cache the title and movie poster image for each unique movieID, but still pull some dynamic data in for each <li> (I removed this other data to simplify my code for this question). I’m not very familiar with caching, but would like to know how to load both new data and cached data when the page is revisited. I know I could use localStorage or sessionStorage for the title, but how do I make it easy for the image to be reloaded without making another request to the server?

Thank you for any insight you can share on my primary or bonus question! -Mark

  • 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-31T00:13:53+00:00Added an answer on May 31, 2026 at 12:13 am

    to move back to a cached page use the #moviesPage method, so instead of index.html use the page Id #index or #profile

    — From comments

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

Sidebar

Related Questions

Data from another system is replicated into a SQL Server 2005 database in real-time
I´m loading data from MySQL DB into Java application. How to define column type?
I send data from Android via HTTP Post to a Server running PHP and
I'm reading data from database and showing it in a page for editing: <h2>Create
I just fetched some data from JSon and listed into my Listview. It's fetching
I'm working on an application that opens a database connection and retrieving data from
I want to fetch data from my web server, and put it into a
I'm pulling data from the Instagram API and caching it using php for use
I want to insert data from wavemaker into database which will be inserted by
Requesting data from any location on my domain with .load() (or any jQuery ajax

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.