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

The Archive Base Latest Questions

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

I have an application with two main pages (a login page and a map

  • 0

I have an application with two main pages (a login page and a map page) that spawn dynamic pages to be used as dialogs, most of which have sub-pages, in a chained dialog structure.

So a perfectly normal course of action would be:

Login -> Map -> Dialog -> Sub-Dialog

Originally, I was moving from Map to Dialog using a button on the interface that looks like this:

<a href="#dialogID" data-icon="arrow-r" data-iconpos="right" data-rel="dialog" data-role="button" data-theme="b" class="ui-btn-right">Info</a>

Using that system, I can navigate perfectly fine from Login through to Sub-Dialog and back again, using either the close button on the dialog, or the back button on the browser. The address bar updates as follows:

Login Page: http://serverName/
Maps Page: http://serverName/#page-map
Dialog: http://serverName/#page-map&ui-state=dialog
Sub-Dialog: http://serverName/#page-map&ui-state=dialog&ui-state=dialog

This is perfectly normal behaviour, and works fine as long as I follow the link with the data-rel=”dialog”.

But I wanted to change the behaviour of my site, so that when you click on a Google Maps marker object, it opens the dialog directly. I do this with the following:

$.mobile.changePage($("#dialogID"), { role: "dialog" });

When I do this, navigating Back or hitting the Close button on the Sub-Dialog kicks me back to viewing the Login page. However, the URL is that of the Dialog state. So the URL is right, but what I see on the screen is wrong.

So instead of normally being able to go ABCD->DCBA, I’m now going ABCD->DA and skipping those two pages in the middle.

Is this a bug in jQueryMobile? Or am I using changePage wrong?

EDIT: Here’s an in-depth JSFiddle that exhibits the behaviour: http:// jsfiddle.net/LxFJq/14/ It seems to come up because of the dynamic pages. When they were static pages ( http:// jsfiddle.net/hgb7s/2/ ) It all works like expected. The dynamic pages break the navigation, but only in the edge case of clicking from an event handler. At least I’ve narrowed it down.

SOLVED: I solved the problem myself.

The <a data-rel=”dialog”> tag will automatically add a data-url attribute to the new page. The changePage() function will not. So I added them myself, and everything works. Working result, with data-rel attributes at http://jsfiddle.net/LxFJq/15/

Found this information based on the first two comments from this: https://gist.github.com/1037934

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

    I solved the problem myself.

    The <a data-rel=”dialog”> will automatically add a data-url attribute to the new page. The changePage() function will not. So I added them myself, and everything works. Working result at http://jsfiddle.net/LxFJq/15/

    Found this information based on the first two comments from this: https://gist.github.com/1037934

    I’ve submitted this as a bug to jQueryMobile’s GitHub repo.
    (Now I have to wait two days to accept my own answer.)

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

Sidebar

Related Questions

I have an application that has two threads. The first one (the main thread)
I have an application that contains two Activities with <intent-filter> <action android:name=android.intent.action.MAIN/> <category android:name=android.intent.category.LAUNCHER/>
I'm trying to write an android application that has two main activities: login screen
I'm working on Android application which have two different tabhost : Main and Child.
I have two application that need to talk to each other. App1 needs to
I have an application that has two localization options at the moment through .resx
I have a web application and two class files, First class is MyClass.class which
I have application in VB.net that have two different form (Form1 and Form2). Now
I have a home page activity that I got from an example, which works
I have a web application which contains jsp pages for desktop and mobile devices

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.