Languages

Menu
Sites
Language
Page not loading properly when redirected back

Hi,

I'm building a simple calendar app by using Tizen web application SDK. I added a link 'About Us' in footer of 2nd page. That will redirect to a page containning some details. 

In about us page, there is a button. When I click on that button, I should be redirected back to previous page. It gets redirected back, however I get a page where everything is messed up.

Why does it get messed up when redirected back? 

Here is some part of my code:

<div id="pop_js" data-role="popup"> 
     <ul data-role="listview"> 
      <li>
              
              <a href="section2.html" data-rel="back">
                  About Us!
              </a>
              
              
          </li>  
      <li><a href="#" data-rel="back">Email Us</a></li> 
      <li><a href="#" data-rel="back">Rate Us</a></li> 
      <li><a href="#" data-rel="back">Share</a></li>
      <li><a onclick="goodbye(e)">Exit the app</a></li> 
     </ul> 
    </div> 

This is redirection back code:

<button id="myButton" class="float-left submit-button" >
                Click here to go back
            </button>
            <script type="text/javascript">
                document.getElementById("myButton").onclick = function () {
                    location.href = "section1.html";
                };
            </script>

Where is the error? 

Responses

2 Replies
colin Rao
Hi, Suggest to use call window.history.back() in jQuery temple project, or use tau.changePage (toPage, options) or tau.back ( ) .
AVSukhov

Hello,

You may use default behavior for hardware Back button