Question

I have just started app development for the FirefoxOS. The simulator has just one 'Home' button, unlike that of android phones which have the 'Back' button also.

So, how do I implement a back button in my application? Because, if you just redirect the current page to the previous page, things like the form field values will be lost. Right?

Was it helpful?

Solution 2

I found the solution.

<div data-role="header" data-position="fixed">
   <a href="#" data-rel="back">Back</a>
   <h3>List of Notes</h3>
</div>

That <a> with the data-rel="back" does the trick!

Thanks!

OTHER TIPS

From inside your app you can add your own back button/navigation UI and manipulate the browser history to go back with window.history.back();

If your app was made for platforms that have a dedicated back button (like Android does) and you don't want to add you own navigation in the app, you can also add a browser toolbar at the bottom of the app, by setting "chrome": { "navigation": true } at your manifest, but this will not provide the best user experience.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top