- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
My app was working fine, but I upgraded XDK yesterday to version 1826 and now my App hangs in the emulator.
I tested the App in a Chrome Browser and all works fine. Tested the App on my Android device and likewise still working, but in the Emulator its not working.
After a lot of digging I've found that the line containing "window.location.href" in a ajax function is failing.
Whats changed in the new version of XDK???
Should I be doing something different???
Strangely I have other "window.location.href" lines calling other local pages and they work. But this function is failing and I can't see why.
Any idea???
function setDBVersionAjax() { var resturl = restServerURL + "?request=dbversion"; $.ajax({ url: resturl, headers: { 'Access-Control-Allow-Origin': '*' }, crossDomain: true, dataType: 'json', success: function(data) { localStorage.setItem('DBVersion', data.version); window.location.hef = "init_db.html"; } }); }
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Typo in my posting on the function, should have read as below
function setDBVersionAjax() { var resturl = restServerURL + "?request=dbversion"; $.ajax({ url: resturl, headers: { 'Access-Control-Allow-Origin': '*' }, crossDomain: true, dataType: 'json', success: function(data) { localStorage.setItem('DBVersion', data.version); window.location.href = "init_db.html"; } }); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a known issue with changing to relative location during ajax call in the emulator. Your app should work fine on App Preview and with build. Please see the work around for the emulator in this thread : https://software.intel.com/en-us/forums/topic/542014
Swati
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Swati...
The work around code has indeed fixed the problem. Will this known "feature" be resolved in the next release of XDK?
Ian

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page