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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:15:34+00:00 2026-05-28T06:15:34+00:00

I have a single page template page ( page1.aspx ) which loads a multi-page

  • 0

I have a single page template page (page1.aspx) which loads a multi-page template page (page2.aspx)

The Multi-page template page has buttons which show internal pages as dialogs. When page1 loads page2 via the default AJAX behavior, the buttons on page2 do not work. Forcing a refresh of page2 in the browser lets the buttons on page2 work.

If I add data-ajax="false" to my links in page1, all is fine.

How do I have a multi-page template page load via AJAX so that buttons on it work?

  • 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-28T06:15:35+00:00Added an answer on May 28, 2026 at 6:15 am

    You cannot link to a multi-page document via AJAX. Only the first data-role="page" element will be imported into the DOM and everything else will be ignored (even content in the <head>).

    If you link to the multi-page template without AJAX then the whole page will load and all of the data-role="page" elements will be available. To do this you can set attributes on specific links like this:

    <a hef="#" data-ajax="false">my link</a>
    

    Or like this:

    <a hef="#" rel="external">my link</a>
    

    You can also set this option globally like this:

    <script src="jquery.js"></script>
    <script>
    $(document).bind('mobileinit', function () {
        $.mobile.ajaxEnabled = false;
    });
    </script>
    <script src="jquery-mobile.js"></script>
    

    UPDATE

    I have seen a plugin that allows you to do what you want, but I have not been able to find it. It just pulls all the data-role="page" elements in from the multi-page document rather than just the first one (it seems to me that this would create some strange deep-linking issues however).

    UPDATE

    Oh, and it’s a good one 🙂

    With version 1.0, jQuery Mobile will let you pre-fetch pages by adding the data-prefetch="true" attribute to links. If you split your multi-page template into separate pages, you can then pre-fetch them so they will be added to the DOM and appear “instantly” when the link to them is clicked (rather than waiting for the AJAX request to resolve).

    Docs for prefetching: http://jquerymobile.com/demos/1.0/docs/pages/page-cache.html

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

Sidebar

Related Questions

I have a single template file which renders pages that look very similar, but
I have a struts2 application with a single page that may show one of
I have a nested user control which appears on every single page. It contains
I have multiple pages being pulled together into a single page. Some of these
I have an ASP.NET Site that has a single Master Page. On one of
I want to show three XMLs on a single html page. These XMLs have
At the moment I have a single html page that has 4 templates in
Basically I have a single page on my site that I want any php
If I have a single page with many forms of existing records: index.html.haml -
I have an image upload page (single page). When submitted it check filesize and

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.