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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:12:10+00:00 2026-06-19T03:12:10+00:00

This fiddle shows more or less what I am trying to do. I am

  • 0

This fiddle shows more or less what I am trying to do.

I am querying some results from a Parse.com database. The results are returned in the success callback.

Can anyone tell me the best way to work with them in the mainView() function? I would like to keep all queries separate from the logic of how they are displayed. I have tried quite a few different approaches, but haven’t been able to get it working.

  • 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-06-19T03:12:11+00:00Added an answer on June 19, 2026 at 3:12 am

    Simply store a reference to this outside the callback.

        var userInterface = {
    
    
        newQuery: function() {
            var that=this; //store a reference to "this"
    
            Query = Parse.Object.extend("Test"); 
            query = new Parse.Query(Query);
    
            query.descending("createdAt");    
            query.equalTo("column1", "a");
    
            query.find({
                success:function(results){
    
                     that.mainView(results); //that points to the userInterface object
    
                },
                error:function(error){
    
                }
    
    
            });
        }, 
    
    
    
        mainView: function(res){
    
            console.log(res);
    
        },
    
        init: function() {
           this.newQuery();        
        }
    
    };
    userInterface.init(); 
    

    http://jsfiddle.net/4XsLq/8/

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

Sidebar

Related Questions

In this fiddle I'm just trying to return true : http://jsfiddle.net/WCFtp/ for jQuery key
The base fiddle is here for more context. That example shows only three elements
This has been driving me crazy.. I am trying to return a value from
I am using some code from a fiddle made by a member of StackOverflow.
I have this fiddle http://jsfiddle.net/jdsans/38GFS/ which I was trying to workout but I could
I have a fiddle that shows a menu that I build. This is a
Take a look at this fiddle which shows a sample menu that I've written.
In this fiddle http://jsfiddle.net/dAHqe/2/ I've created examples for the 2 main uses (that I've
In this fiddle when user drags a div auto scroll works in chrome but
see this fiddle . This upon running gives an error in console. I'm currently

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.