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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:52:22+00:00 2026-06-07T04:52:22+00:00

I created the following example to show what I am experiencing. If I navigate

  • 0

I created the following example to show what I am experiencing.

If I navigate from page1 to page 2 with the button Page 2a, the URL will be …#page2?id=a as expected.

When I click the button to go back to Page 1, then navigate to Page 2b, the URL will still show “#page2?id=a“, but the <a> tag is clearly has an href of “#page2?id=b” along with the $(e.target).attr("data-url") being “#page2?id=b” when I get to #page2.

Any ideas what is going on here? Thanks in advance for any help.

<html>
   <head>
      <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
      <script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
          <script>
             $("#page2").live('pageshow', function(e) {
                alert($(e.target).attr("data-url"));
                $("#page_text").html("Page 2"+($(e.target).attr("data-url").replace(/.*id=/, "")));
             });
          </script>

   </head>
   <body>
      <div data-role="page" data-theme="c" id="page1">
         <div data-role="content">
            <p>Page 1</p>
            <a href ="#page2?id=a" data-transition="flip" data-role="button">Page 2a</a>
            <a href ="#page2?id=b" data-transition="flip" data-role="button">Page 2b</a>
         </div>
      </div>

      <div data-role="page" data-theme="a" id="page2">
         <div data-role="content">
            <p id="page_text"></p>
            <a href ="#page1" data-transition="flip" data-role="button">Page1</a>
         </div>
      </div>

   </body>
</html>

Code sample is here on jsfiddle too.

  • 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-07T04:52:23+00:00Added an answer on June 7, 2026 at 4:52 am

    I was able to resolve this issue by using the jqm.page.params plugin with help from this question on stackoverflow. Here is my code for using this plugin:

    <html>
       <head>
          <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
          <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
          <script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
    
          //Added the jqm.page.params plugin
          <script src="https://raw.github.com/jblas/jquery-mobile-plugins/35fcf54e2af380aa0e98e9f384572b02f58a1ea1/page-params/jqm.page.params.js"></script>
          <script>
             $("#page2").live('pageshow', function(e) {
                alert($(e.target).attr("data-url")+$.mobile.pageData.id);
                //$("#page_text").html("Page 2"+($(e.target).attr("data-url").replace(/.*id=/, "")));
                $("#page_text").html("Page 2"+$.mobile.pageData.id);
    
             });
             $(document).bind("pagebeforechange", function( event, data ) {
                $.mobile.pageData = (data && data.options && data.options.pageData)
                                       ? data.options.pageData
                                       : null;
             });
          </script>
    
       </head>
       <body>
          <div data-role="page" data-theme="c" id="page1">
             <div data-role="content">
                <p>Page 1</p>
                <a href ="#page2?id=a" data-transition="flip" data-role="button">Page 2a</a>
                <a href ="#page2?id=b" data-transition="flip" data-role="button">Page 2b</a>
             </div>
          </div>
    
          <div data-role="page" data-theme="a" id="page2">
             <div data-role="content">
                <p id="page_text"></p>
                <a href ="#page1" data-transition="flip" data-role="button">Page1</a>
             </div>
          </div>
    
       </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

following some example from Microsoft I created my custom MembershipProvider in my MVC application
I created the following simple PL/SQL stored procedure example to ask a specific question.
Please forgive the verbosity of the following code example. Using Delphi 2009, I created
I was already running a sub-website under following path http://example.com/sub-site/ Now, I have created
I am trying to create dynamic menus from the database using the following example
I want to create URL re-write rules for following URL in htaccess. http://example.com/vedios/category/fun/ ->
I did same as show in authlogin example . User is created successfully and
IOS/IB Question - To clarify my question I'll use the following example. I created
The following example code will load a jqGrid (this code works) ... jQuery(document).ready(function ()
For example, I would like to create a new 'Tweet' object from the following

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.