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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:02:13+00:00 2026-05-20T23:02:13+00:00

I have a issue with being able to link back to the home page

  • 0

I have a issue with being able to link back to the home page from a AJAX response from a Multi-page layout form submission

The structure

index.php has multi-page agreement (index.php#agreement)

#agreement has a form that is using the default AJAX call for submission to (agreement.php)

From agreement.php I can go back to the last page (#agreement) which is expected but now I wanted to go back to the index.php page.

I can easily put href="index.php" but then the session looses it values.

Is there a way to go back two steps? or access the URL history and point to a specific page without loosing any of the data in the form(s)?

I have binded agreement.php using this code in index.php

$('#agreement_status').live('pageshow',function(event, ui){
    // Button action
    $('#back_home').click(function(){
        window.history.back(); // this goes back one page to index.php#agreement
        window.history.back(-2); // this goes back one page to index.php#agreement
        $.mobile.changePage("#index", "slideup"); // this works but appends the hashtag in the URL which breaks the other functionality 
    });
});

In agreement.php I have this code

<a id="back_home" 
   data-role="button" 
   data-icon="home" 
   data-theme="z" 
   data-inline="true" 
   style="float:right;">
    Home
</a>
  • 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-20T23:02:13+00:00Added an answer on May 20, 2026 at 11:02 pm

    Well this is not really an answer to my question but it did solve my problem:

    agreement.php back button code, use the data-rel=”back” option in the anchor tag and add a div tag with name/id agreement_status

    <a data-rel="back" 
       data-role="button" 
       data-icon="home" 
       data-theme="z" 
       data-inline="true" 
       style="float:right;">
        Home
    </a>
    

    In the index.php page, add this to your java script

    $('#agreement_status').live('pagehide',function(event, ui){
        window.history.back();
    });
    

    What happen is the pagehide fires when the agreement_status page is hidden, so you will be on the #agreement page. Then with window.history.back(); we are able to go back to the index.php page and still keep all the data in tacked without the need for a refresh of the page

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

Sidebar

Related Questions

As anybody ever have add issue with still being able to scroll outside the
I have an issue with the xaml not being able to find the declared
I have an issue where input is being doubled, tripled, quadrupled, etc. on user
I have an interesting issue with HTTPS ports not being handled properly. It is
I have a weird issue. I have some icons that are being built based
After being troubled by an issue that I simply did not have the knowledge
Bottom line: I'd like to disable (with jQuery) certain elements from being able to
I have an issue where I need to be able to use check boxes
We have had issues with Mootools not being very backward compatible specifically in the
I have an HTML table with one column being email addresses; spambot issues aside,

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.