Hi for navigating from one page to another i used $.mobile.changePage('test.html');
. This works fine in android,symbian and blackberry6+.But I also want my application to run on blackberry5. Blackberry5 does not support ajax and therefore $.mobile.changePage('test.html');
not work for it.
window.open("test.html");
and
window.location.href = "test.html";
Here it works perfectly in all platform including blackberry4.6+ also. But now problem is I have header in test.html as:
<div data-role="header" align="center">
<a href="#" data-rel="back" data-icon="arrow-l">Back</a>
<h1>Test.html</h1>
<a href="MainMenu.html" data-icon="grid">Menu</a>
</div>
But here now back button is not working. If I use $.mobile.changePage('test.html');
for navigation then back button works perfectly but not with window.open("test.html");
and window.location.href = "test.html";
.
<script type="application/javascript">
function redirect(url)
{
alert("inside redirect:"+url);
window.location = url;
}
</script>
<div data-role="navbar">
<ul>
<li> <a onclick="redirect( getCookie('paged'))" data-icon="back" data-iconpos="notext" data-direction="reverse" class="ui-btn-left jqm-home">Back</a></li>
<li> <a onclick="redirect(getCookie('paged'))" data-icon="back" data-iconpos="notext" data-direction="reverse" class="ui-btn-left jqm-home">Back</a></li>
</ul>
</div>
Here now back button also works perfectly but when I click on hardware back button then it again goes to previous pages from where it came.
How I can use $.mobile.changePage(...)
without ajax so I can use it for all platforms including blackberry4.6+
Any suggestion will be appreciated. Thanks in advance.