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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:09:12+00:00 2026-06-15T21:09:12+00:00

I have a html file with few pages, and when a user press a

  • 0

I have a html file with few pages, and when a user press a button on a specific page, I’m loading a new html file that contain pages with the results.
The page loading work just fine, the problem is that i can’t manage to navigate between the new pages in the new html.
when i load the page manually on my browser, it work’s perfectly.

anyone got any idea why?
i think i need to perform a kind of refresh action to the page after the loading complete, but i don’t wont to do so, because the page retrieve data from a remote server, and i don’t know if the refresh action will try to retrieve the data from a remote server again(and that will duplicate the time the user will wait until he get an answer).

this is the code line i use:
$.mobile.changePage( “menu.php?q=”+query, { transition: “slide”} );

Thank you

  • 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-15T21:09:14+00:00Added an answer on June 15, 2026 at 9:09 pm

    ... the problem is that i can't manage to navigate between the new pages in the new html.

    This line leads me to believe that you are attempting to return a multi-page template for a remote URL link (meaning the link you press doesn’t link to a pseudo-page on the same document, but rather another document all together). This is not allowed by default by jQuery Mobile (I think you can find a plugin for the functionality). jQuery Mobile only retrieves the first data-role="page or data-role="dialog" element from the returned external document.

    You can either use single-page templates, where each single pseudo-page is contained in its own document and you link to each of them via a normal URL (e.g. “/contact-us/index.php”)

    OR

    You can place all necessary pages in a single document, and link between them with hash based links (e.g. “#home”). When you do this, you can still retrieve data from a database, but you’ll have to create the code to do so via AJAX (and most likely binding to page-events).

    OR

    Maybe there is a plugin for this. If not, it’s actually not that difficult a thing to make, you just need to grab the external data-role="page" elements by yourself rather than letting jQuery Mobile do it, add them all to the DOM, and then transition to the first one like normal.

    UPDATE

    If you want to load multiple pseudo-pages at once, try this:

    //hijack link clicks on links with the `click-hijack` class
    $(document).on('click', '.click-hijack', function () {
    
        //show loader
        $.mobile.loading('show');
    
        //create AJAX request for pseudo-page(s)
        $.ajax({
            url      : $(this).attr('href'),
            dataType : 'html',
            success  : function (response) {
    
                //hide loader
                $.mobile.loading('hide');
    
                //get the pseudo-page(s) from the AJAX response
                var $pages = $(response).find('[data-role="page"], [data-role="dialog"]');
    
                //append the pseudo-page(s) to the DOM
                //(this may need to change if you are using a framework like ASP.NET as they can add wrapper DOM elements)
                $("body").append($pages);
    
                //now that the pesueo-page(s) is/are in the DOM, we can transition to them normally
                $.mobile.changePage('#' + $pages.eq(0).attr('id'));
            },
            error    : function () {
                //don't forget to handle errors
            }
        });
    
        //stop the default behavior of the link, as well as propagation of the click event
        return false;
    });
    

    Note: This code is untested, please take this into consideration when using the code.

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

Sidebar

Related Questions

I have a lot of HTML pages that need the same few lines of
I have a small web app that is nothing more than a few HTML
I have a large HTML file (In ASP.NET) that has several smaller ... tags
I have a pretty simple python webserver that returns a few web pages, and
I have the need to grab a few DOM Elements from an HTML page
I have html-file. I have to replace all text between this: [%anytext%]. As I
I have a html file like following: <form action=/2811457/follow?gsid=3_5bce9b871484d3af90c89f37 method=post> <div> <a href=/2811457/follow?page=2&amp;gsid=3_5bce9b871484d3af90c89f37>next_page</a> &nbsp;<input
I have an HTML file and i would like to parse through it using
I have following html file (1.html) and once I open it in my browser
I have a .html file with some scripts in it. Works fine on localhost

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.