Software Archive
Read-only legacy content

Back Button

Alexander_F_
Novice
4,651 Views

I have this html line, but when I clicked on back button nothing happens

<a href="javascript:" data-rel="back" data-transition="flip"><i class="fa fa-chevron-left"></i></a>

I appreciate any comments ASAP, thanks in advance.

0 Kudos
17 Replies
Dale_S_Intel
Employee
4,651 Views

Are you using jQuery mobile?  Could you provide a simple complete example that illustrates what you're talking about?  Is this a multi-page app?

Dale

 

0 Kudos
Alexander_F_
Novice
4,651 Views

Sure when I moved to info_page and need to go back clicked on Back button and nothing happens, here is my code

    <!--include 'views/info_page.php'; //00-->
    <div data-role="page" class="page" id="info_page">
        <div class="main" data-role="content" class="ui-content">
            <div class="header-actions left">
                <!-- Back Button -->
                <a href="javascript:" data-rel="back" data-transition="flip"><i class="fa fa-chevron-left"></i></a>
            </div>
            <div align="left" style="margin-top: 30px;">
                <h3 id="info_name"></h3>
                <div id="info_content" style="text-align:justify"></div>
            </div>
        </div>
    </div>

 

0 Kudos
Alexander_F_
Novice
4,651 Views

I noticed that the problem is with the sentence data-rel="back" because fx when I open a popup and try to close doesn't work either.

                            <a href="#edit_business_map" data-rel="popup" data-theme="a" data-transition="pop" data-position-to="origin" style="color:#226ab5;">Edit</a>
                            <div data-role="popup" id="edit_business_map" data-theme="a" class="ui-corner-all">
                                <a data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right"></a>
                                <div style="padding:10px 20px;">
                                    <h3>Mapp</h3>
                                    <input type="text" name="edit_address[]" id="edit_business_address1" placeholder="address1">
                                    <input type="text" name="edit_address[]" id="edit_business_address2" placeholder="address2">
                                    <input type="text" name="edit_address[]" id="edit_business_address3" placeholder="address3">
                                    <select id="edit_business_country" name="edit_country" ></select>
                                    <div id="div_edit_business_state"><select id="edit_business_state" name="edit_state" ></select></div>
                                    <input type="text" name="edit_city" id="edit_business_city" placeholder="city">
                                    <input type="text" name="edit_zip" id="edit_business_zip" placeholder="zip code">
                                    <button type="button" class="ui-btn ui-corner-all" onclick="save_editable('edit_business_map')" data-rel="back" data-transition="inverse" >Save</button>
                                </div>
                            </div>

 

0 Kudos
Dale_S_Intel
Employee
4,651 Views

I'll try playing with it and see what I can figure out.

 

0 Kudos
Alexander_F_
Novice
4,651 Views

Then you have the solution, please let me know ASAP

Thank You

0 Kudos
Elroy_A_Intel
Employee
4,651 Views

I recommend replacing

<a href="javascript:" data-rel="back" data-transition="flip"><i class="fa fa-chevron-left"></i></a>

with

<a href="#" class="ui-btn" data-rel="back">Back</a> 

instead. 

0 Kudos
Alexander_F_
Novice
4,651 Views

Nothing Elroy, doesn't work

<a href="#" data-rel="back" class="ui-btn">Back</a>

0 Kudos
Elroy_A_Intel
Employee
4,651 Views

This is a working example of transitioning to and backward among pages using jQuery Mobile.

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>

<div data-role="page">
  <div data-role="header">
    <h1>Welcome To My Homepage</h1>
  </div>

  <div data-role="main" class="ui-content">
    <p>I Am Now A Mobile Developer!!</p>
<a href="#pagetwo" data-transition="flip" class="ui-btn">Go to Page Two</a>
  </div>

  <div data-role="footer">
    <h1>Footer Text</h1>
  </div>
</div> 

<div data-role="page" id="pagetwo">
  <div data-role="header">
<a href="#" data-rel="back">Back</a>
    <h1>Welcome To My Second page</h1>
  </div>

  <div data-role="main" class="ui-content">
    <p>Thank you!!</p>
  </div>

  <div data-role="footer">
    <h1>Footer Text</h1>
  </div>
</div> 

</body>
</html>

 

0 Kudos
Alexander_F_
Novice
4,651 Views

I try to send you a MP4 file where you can see the result of this code but is not allowed this kind of file, but the result is that this code doesn't work on XDK.

https://dl.dropboxusercontent.com/u/33797440/back_button_do_not_work.mp4

 

 

0 Kudos
Elroy_A_Intel
Employee
4,651 Views

Does it work on device?

0 Kudos
Alexander_F_
Novice
4,651 Views

Nope :-(

0 Kudos
Alexander_F_
Novice
4,651 Views

Hey any update with this, still doesn't work

Thank You

0 Kudos
Alexander_F_
Novice
4,651 Views

Please do not forgot that this issue is still open and I need a solution, because before the last update everything works fine and now after the update was the problem... the data-rel="back" doesn't work on Mobile Devices...

Thank You in advance.

0 Kudos
PaulF_IntelCorp
Employee
4,651 Views

@Alexander -- the issue you posted on in this thread, which I believe is the same being described above, is only with the Emulate tab, it does not impact on-device usage. Have you tried to debug this using Debug tab? The Emulate tab is NOT a good indicator of on-device behavior.

0 Kudos
Alexander_F_
Novice
4,651 Views

Is impossible, now with the new version v.2323 for OSX,

the data-rel="back" doesn't work on Apple Devices even with the App Preview

but in XDK Emulator everything works fine.

Please let me know now how I can solve this issue and no more surprises please.

Thank You.

<a href="#" data-rel="back">Back</a>

0 Kudos
PaulF_IntelCorp
Employee
4,651 Views

Nobody is trying to surprise you, we're trying to help. In order for that to happen, you need to provide more precise information.

The recent XDK releases have no impact on the behavior App Preview or on built apps. The XDK release only impacts the Emulate tab. So if the problem only appears on a real device it is not the XDK that is causing that. It may be due to the way the webview on your device behaves. We do not control the behavior of the webview on a real device, that is controlled by the manufacturer of that device, the XDK has no control over that. The only place where we can influence that behavior is when you use Crosswalk, otherwise, the behavior on-device is a function of the device, not the XDK.

Please provide a simple example project that can be used to illustrate the problem AND describe the steps and conditions to duplicate the problem. For example:

  • sync with Test tab
  • touch button "x" and you should see "alert y"
  • etc.

Describe the device you are using, such as an iPhone 6 running iOS 8.1. etc.

Please ZIP the sample project, include all the contents of the project directory, not just the index.html file, so we have all the information about your sample project. Do not make the project complicated, doing so will not help us help you.

0 Kudos
Reply