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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:42:32+00:00 2026-05-30T16:42:32+00:00

I am new to working with Javascript/JQuery so apolygies if there are other q&a’s

  • 0

I am new to working with Javascript/JQuery so apolygies if there are other q&a’s that solve my problem. In short, I am trying to create a mobile application which pulls some data from Parse and uses this to populate a list on a html page when this page is loaded.

So far I have the javascript file (‘dataController’) below:

if(!window.dataCon){
DataCon = {};
}

$(document).ready(function(){
DataCon.getApps = function(){

  renderApps= function(data){
                for(var i = 0;i<data.results.length;i++)
                {            

                  var rec = data.results[i];

                  var appTitle;

                  if(rec.title) appTitle = rec.title;
                  else appTitle = "Title Unknown";

                  var appCategory;

                  if(rec.category) appCategory = rec.category;
                  else appCategory = "Category Unknown";

                  var appLastBuilt;

                  if(rec.lastBuilt) appLastBuilt = rec.lastBuilt;
                  else appLastBuilt = "unknown";

                  $("#myList").append('<li><a href=""><h3>'+ appTitle +'</h3><p>'+ appCategory +'</p><p>'+ appLastBuilt +'</p></a></li>');

                  $("#myList").listview('refresh'); // This line now updates the listview
              }
}

        $.ajax({
        url:      App.Config.endpoint+"/1/classes/Applications",
        contentType: "application/json",
        type:     "GET",
        headers:{
        'X-Parse-Application-Id': App.Config.applicationId  ,
        'X-Parse-REST-API-Key': App.Config.masterKey
        },
        dataType: "json",
        success:  function(data) {

        renderApps(data);
        },
        error:function (xhr, ajaxOptions, thrownError){
                    alert('error Status:'+xhr.status);
                } 
    });
}// JavaScript Document
});

This is an extract from my .html file

<ul id="myList" data-role="listview" data-theme="g" inset="true"">      
</ul>

I also have a js file which configures the Parse information i.e. applicationId, masterKey and endpoint. My problem is that when I load the html file which uses the ‘dataController’ js file nothing is displayed in the list! I am not sure what I am doing wrong. Any assistance or pointers would be much appreciated. 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-30T16:42:32+00:00Added an answer on May 30, 2026 at 4:42 pm

    Your functions definition needs a bit of refactoring, try this:

      function renderApps(data){
                    for(var i = 0;i<data.results.length;i++)
                    {            
    
                      var rec = data.results[i];
    
                      var appTitle;
    
                      if(rec.title) appTitle = rec.title;
                      else appTitle = "Title Unknown";
    
                      var appCategory;
    
                      if(rec.category) appCategory = rec.category;
                      else appCategory = "Category Unknown";
    
                      var appLastBuilt;
    
                      if(rec.lastBuilt) appLastBuilt = rec.lastBuilt;
                      else appLastBuilt = "unknown";
    
                      $("#myList").append('<li><a href=""><h3>'+ appTitle +'</h3><p>'+ appCategory +'</p><p>'+ appLastBuilt +'</p></a></li>');
    
                      $("#myList").listview('refresh'); // This line now updates the listview
                  }
    }
    
    $(document).ready(function(){
            $.ajax({
            url:      App.Config.endpoint+"/1/classes/Applications",
            contentType: "application/json",
            type:     "GET",
            headers:{
            'X-Parse-Application-Id': App.Config.applicationId  ,
            'X-Parse-REST-API-Key': App.Config.masterKey
            },
            dataType: "json",
            success:  function(data) {
                    renderApps(data);
            },
            error:function (xhr, ajaxOptions, thrownError){
                        alert('error Status:'+xhr.status);
                    } 
        });
    });
    

    Hope this helps

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

Sidebar

Related Questions

I'm new to javascript and JQuery, and I'm working in a small project with
I am working on some JavaScript/jQuery code that detected a user agent based against
Im new to Javascript and jquery and I almost have my problem solved. I
First off, let me start by saying that I am totally new to working
In the course of my career I've noticed that developers working on new functionality
I'm pretty new to javascript and jQuery, but I managed to get Trent Richardson's
I'm just getting my bearings with Javascript and jQuery, and I'm working on an
I'm fairly new to jQuery still and am trying to pick up ways to
I need help with some Regexp Javascript/JQuery. I got it working, but I think
I'm new at jQuery (just picked up a book this morning!) and I'm trying

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.