I was using <a href> tag and window.location for links in the pages.But it was displaying the old page itself.
PhoneGap gets notified whenever a new page is to be loaded. However, there is a problem in Phonegap (phonegap-1.0.0rc2 and older versions) in using a <a href> tag or window.location.
As a result, PhoneGap doesn't have any way to intercept the request.So it continues to display old page or it will not be able to handle the parameters passed from previous page.
Code with problems:
<a href="HomePage.html">Home</a>
and
window.location="HomePage.html";
Solution:
1) Use navigator.app.loadUrl(file:///android_asset/HomePage.html); instead of
window.location or <a href tag.
2) Try to make use of same page with sections (<div> tag) than having code written
over multiple page.
PhoneGap gets notified whenever a new page is to be loaded. However, there is a problem in Phonegap (phonegap-1.0.0rc2 and older versions) in using a <a href> tag or window.location.
As a result, PhoneGap doesn't have any way to intercept the request.So it continues to display old page or it will not be able to handle the parameters passed from previous page.
Code with problems:
<a href="HomePage.html">Home</a>
and
window.location="HomePage.html";
Solution:
1) Use navigator.app.loadUrl(file:///android_asset/HomePage.html); instead of
window.location or <a href tag.
2) Try to make use of same page with sections (<div> tag) than having code written
over multiple page.