We are using Worklight 6.0.0 enterprise edition and currently building hybrid apps for android, BB, Windows Phone 8 and iOS.
We are currently getting the below error whe
Looking at the edited comments and question, the problem could be at the path used.
Take a look at the multi-page sample project provided in the IBM Worklight Getting Started webpage. It contains special handling for WP8 which you may need to apply to your logout function as well.
Building a multi-page application training module
Multi-page sample project
Note how the path is handled specifically for Windows Phone 8.
common\main.js:
var path = "";
function wlCommonInit(){
// Special case for Windows Phone 8 only.
if (WL.Client.getEnvironment() == WL.Environment.WINDOWS_PHONE_8) {
path = "/www/default/";
}
...
...
}
You need to now do one of two things:
Updated April 8th, 2014
I have used the sample project you've provided in my previous answer.
Here's an updated version: WindowsTestApp
What I've done:
Removed use of the path
variable in wlCommonInit()
.
Added the changeHash: false
option to $.mobile.changePage()
.
For example: $.mobile.changePage("Pages/MyAccount.html", { changeHash: false });
In WindowTestApp.html
Removed this line from the HEAD
element:
<script>window.$ = window.jQuery = WLJQ;</script>
In js\jquery-1.10.2.js:
Find
xhr.open(s.type, s.url, s.async);
Change to
s.url = s.url.replace("x-wmapp0:///", "");
xhr.open(s.type, s.url, s.async);
Step 3 is correct use of changePage
in case of using WL.Client.reloadApp()
.
Step 4 seems to be a bug in jQuery/jQuery Mobile specific to handling to file location in Windows Phone.