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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:29:30+00:00 2026-06-12T10:29:30+00:00

Hi I develop a mobile app that has 5 html pages in one file.

  • 0

Hi I develop a mobile app that has 5 html pages in one file.

In page 2 I have a listview of expenses of a building.

In page 3 I have a function in order to pay the selected expense from page 2.
At the end of the above function I include the below code

$.mobile.changePage('#page2', 'slideup', true, true);

I want when the app returns to page 2 from page 3 not to display the paid expense.

I want if I understand well a page refresh for page 2 or a listview refresh.

I try to add reloadPage at changepage command with no luck.

How can I do this?

here is the function i use to create the listview

function getItemPayments(buildingcode) {

        var list = $('#recentflatsPayments'),
            items = [];


        $.mobile.notesdb.transaction(function(t) {
            t.executeSql('SELECT DISTINCT buildingaddress, buildingcode FROM expense WHERE buildingcode = ?',[buildingcode], function(t, resultbuilding) {
                var myrow;
                myrow = resultbuilding.rows.item(0);
                $('#displayPayments h2').text(myrow.buildingaddress);
            });
        });

        $.mobile.notesdb.transaction(function(t) {
            t.executeSql('SELECT barcode, buildingcode, buildingaddress, description, entryseason, period, amount FROM expense WHERE buildingcode = ?',[buildingcode], function(t, resultexpense) {
                var i,
                    len = resultexpense.rows.length,
                      myrowpaidlen = 0,
                      myrowpaid = 0,
                      row;
                if (len > 0 ) {
                    for (i = 0; i < len; i += 1) {
                        dummypaid(i);
                    }

                    function dummypaid(i){
                        var row = resultexpense.rows.item(i);
                        t.executeSql('SELECT * FROM expensepayments WHERE Barcode = ?',
                        [row.barcode], 
                        function(t, resultpaid) {
                            var myrowpaidlen = resultpaid.rows.length;
                            if (myrowpaidlen > 0){
                                var myrowpaid = resultpaid.rows.item(0);
                                if (row.amount > myrowpaid.Amount){
                                    items.push('<li><a href="#displayexpense" data-description="' + row.description + '" data-buildingcode = "' + row.buildingcode + '" data-barcode="' + row.barcode + '" data-amount="' + row.amount + '" data-buildingaddress="' + row.buildingaddress + '">' + row.description + '</a></li>');
                                }
                            } else {
                                items.push('<li><a href="#displayexpense" data-description="' + row.description + '" data-buildingcode = "' + row.buildingcode + '" data-barcode="' + row.barcode + '" data-amount="' + row.amount + '" data-buildingaddress="' + row.buildingaddress + '">' + row.description + '</a></li>');
                            }
                            if (i+1 == len){
                                items.push('<li><a href="#displayexpense" data-description="other" data-buildingcode = "' + row.buildingcode + '" data-barcode="0" data-amount="0" data-buildingaddress="' + row.buildingaddress + '">Other</a></li>');
                            }
                            list.html(items.join('\n'));
                            list.listview('refresh');
                            $('a', list).click(function(e) {
                                getItem1Payments($(this).attr('data-description'), $(this).attr('data-buildingcode'), $(this).attr('data-barcode'), $(this).attr('data-amount'), $(this).attr('data-buildingaddress'));
                            });
                            $('#entriesflatPayments').show();

                        });
                    }
                } else {
                    $('#entriesflatPayments').hide();
                }
            })
        });
//  });       
}
  • 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-12T10:29:31+00:00Added an answer on June 12, 2026 at 10:29 am

    Just add the code to hide/show your listview expenses on the pagebeforeload event of page2, like this:

    $('#page2').bind('pagebeforeload',function(event){
       if (expenses_paid) { //use your own logic here
          //hide list view
       } else {
          //show expenses list view
       }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to develop an app for a win CE mobile device that downloads
I want to develop cross platform mobile app. I have seen frameworks listed below
I am trying to develop a system that has 2 tiers: a mobile client
I develop a back-end for a mobile application with cakephp I have a function
I am planning to develop an mobile app (my first one) for multiple operation
I need to develop a mobile app that is capable of using the device's
We want to develop a business mobile app that would integrate with our existing
I am new to Jquery mobile I have develop a website that work fine
develop one app speech to text conversion on mobile phones.i want to develop it
I'm trying to develop a mobile application for some site, that using HTML form

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.