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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:28:09+00:00 2026-06-18T16:28:09+00:00

I have a site with a user login form shown in a data-rel=’dialog’ link.

  • 0

I have a site with a user login form shown in a data-rel=’dialog’ link. Problem is thatthe dialog is appearing in the history when you hit the browser back button. Screen grabs here – a) shows initial not logged in state, b) open dialog after clicking on ‘login’ button, c) successful login, d) I’ve hit the back button and get my dialog and e) I’ve closed the dialog with the default ‘x’ button, am brought back to my home page, but in a logged out state.

In the code below, the login button/link (to ‘/php/mobile_login.php’ ) is replaced by one’s name is login cookies are detected server side.

Also, given that I get back to the home page with data-dom-cache disabled, should it not fetch it from the server again?

Many thanks, Kevin

<!DOCTYPE html>

<html lang='en'>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<title>title</title>
<meta name='viewport' content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;' />


<script src='//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
<script src='/js/jquery_mobile_global_defaults.js'></script>
<script src='http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js'></script>
<link rel='stylesheet' href='/design/mobile_style.css'>
<link rel='stylesheet' href='http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css' />
</head>
<body>

<div data-role='page' data-dom-cache='false' id='homepage'>

    <div class='header'>
        <div class='logo'></div>
        <div class='login'><a href='/php/mobile_login.php' data-overlay-theme='b' data-transition='none' data-rel='dialog' data-role='button' data-inline='true' data-icon='arrow-r' data-iconpos='right' data-theme='a' data-mini='false'>Login</a></div>
    </div>


    <div class='mobile_content'>
    content
    </div>

</div>

</body>
</html>

Dialog:

<!DOCTYPE html>

<html lang='en'>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<title>title</title>
<link rel='stylesheet' href='/design/mobile_style.css'>
<link rel='stylesheet' href='http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css' />
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
<script src='/js/jquery_mobile_global_defaults.js'></script>
<script src='http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js'></script>
</head>

<body>

<div data-role='dialog'  id='member_login_div' data-overlay-theme='b'>
        <div data-role='header' data-theme='d'>
            <h1>Login</h1>

        </div>

        <div data-role='content' data-theme='c'>
        Login below to apply for jobs with your stored CV (use the desktop version of the site to upload your CV if you have not already done so).
        <form data-ajax='false'  method='POST' action='/php/mobile_do_login.php'>
        <label for='cjloginemail' class='ui-hidden-accessible'>Email Address</label>
        <input type='text' name='user_email' id='cjloginemail' value='kevin@solomon.ie' placeholder='Email Address'>
        <label for='cjloginpass' class='ui-hidden-accessible'>Password</label>
        <input type='password' name='password' id='cjloginpass' value='' placeholder='Password'>
        <input name='Submit' type='submit' value='Login'>
        </form>
        <p><a href='/php/mobile_forgot_pass.php'>I forgot my password - email it to me.</a>


    </div>

</div>
</body>
</html>
  • 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-18T16:28:10+00:00Added an answer on June 18, 2026 at 4:28 pm

    Maybe you could try closing any dailog onload using $('.ui-dialog').dialog('close').

    REF: JQuery mobile – Dailogs

    I have read this on the same page, it is weird that it is happening to you.

    **

    History & Back button behavior

    **

    Since dialogs are typically used to support actions within a page, the framework does not include dialogs in the hash state history tracking. This means that dialogs will not appear in your browsing history chronology when the Back button is clicked. For example, if you are on a page, click a link to open a dialog, close the dialog, then navigate to another page, if you were to click the browser’s Back button at that point you will navigate back to the first page, not the dialog.

    UPDATE: Dialog appears on back button in FireFox browser. Works fine on IE9 and Chrome.

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

Sidebar

Related Questions

I have 2 site: example.com and exampletwo.com I want that when a user login
I have built a site which requires user to login. Now I have decided
I have a form that on load show login form on webbrowser. When user
I have been creating user login form using the various groupcodes, the user login
I have an ajax based login form for my site and have noticed that
I have a login form at the following page: site.com/en/downloads en is the user_language
I have a link on my site which opens a modal dialog with the
I have a site that has a /sites/default/files/ directory where user content is typically
Hi I have a site where I use a User Table. I want to
I have this example FactoryGirl.define do @site = FactoryGirl.create(:my_site) factory :user do email {

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.