I have an application made by using phonegap 1.5.0 and jquery mobile 1.1.0.... I have a structure like this
<div data-role="page" id="page1">
</div>
<div data-role="page" id="page2">
</div>
I call a webservice on page show of the page2 like this
$("#page2").on("pageshow", function(e) {
$
.ajax({
type : 'GET',
url : "http://192.168.1.88:9051/some.xml"
+ "?time=" + Date.now(),
data : {
key : "value"
},
dataType : "xml",
success : function(xml) {
},
error : function(xhr) {
alert("Error while loading the Mock Service !!!");
}
});
});
This works fine if i enter for the first time to Page2. Suppose if i navigate back to page1 and then again to Page2 then the webservice isnt called.
I even tried with pageinit and it didnt worked... Is this some Ajax issue?
How to rectify this?