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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:28:49+00:00 2026-05-31T18:28:49+00:00

I am working on a JQuery Mobile application. Each of my .html files basically

  • 0

I am working on a JQuery Mobile application. Each of my .html files basically has a

<div id="myPage" data-role="page">
  <!-- My Content -->
</div>

Each of my pages will have a couple of dialogs associated with it. Because of this, I thought it would make sense to include those dialog definitions within the same .html file as the page it is associated with. However, all of the JQuery Mobile docs that I see have the dialogs in their own .html files.

Is there a way to define a dialog in the same .html file as a typical page? If so, what is the recommended approach? I know that JQuery mobile does some smart stuff with the DOM to make it perform so well. Because of that, I’m not sure if I do:

<div id="myPage" data-role="page">
  <!-- My Content -->

  <div id="myDialog" data-role="page" data-rel="dialog">
    <!-- My Dialog Conent -->
  </div>
</div>

OR

<div id="myPage" data-role="page">
  <!-- My Content -->
</div>

<div id="myDialog" data-role="page" data-rel="dialog">
  <!-- My Dialog Conent -->
</div>

Even then, I’m not sure how to open the dialog programmatically. Am I way off base here?

  • 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-31T18:28:50+00:00Added an answer on May 31, 2026 at 6:28 pm

    yeas you can include dialogs in the same page. e.g.

        <div data-role="page">
            <div id="content" data-role="content">
                <a href="#dialog1" id="some-dialog" data-rel="dialog" data-role="button">Open Dialog</a>
            </div>
        </div>
    

    Dialog Markup:

       <div data-role="dialog" id="dialog1" class="app-dialog">
            <div data-role="header">
                 <h3>A dialog</h3>
            </div>
                <div id="content" data-role="content">
                       <p>I am a dialog....!</p>
            </div>
       </div>
    

    For more info visit http://jquerymobile.com/demos/1.0a4.1/docs/pages/docs-pages.html.

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

Sidebar

Related Questions

I am working on an application that uses JQuery Mobile . My application has
Still working through JQuery to get data and repopulate portions of a page. Right
I have a single page jquery mobile application in which there are few parent
I am working on an application with JQuery Mobile. I need to use a
I am working on a mobile application that uses the jquery UI select menu
Created a phonegap application using jQuery Mobile. Everything is working great for the most
So I have been working on this phone gap application that uses jquery-mobile. Recently,
I'm working with a CakePHP application and jQuery Mobile. In the CakePHP application, RequestHandler
We have a simple mobile web application using jQuery. The application is working good
Working on a mobile application using jquery mobile and phonegap framework. My question is

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.