- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
when I test the Javascript examples in my Internet Explorer, a Javascript syntax error occurs.
See attached screenshot for details.
I'm using Windows 8.1 with Internet Explorer 11 (German) and latest patches/updates applied.
I've nailed the root cause down to the fact, that the 'xhr.responseText' is an empty String (see screenshot).
This will result in an exception, when calling JSON.parse(xhr.responseText).
This is my proposal for a fix
// file realsenseinfo-3.0.js
// ...
var xhr = new XMLHttpRequest();
var url = 'http://localhost:4182/Intel/RealSense/v3/' + JSON.stringify(components);
xhr.open("GET", url, true);
xhr.timeout = 1000;
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.responseText.length > 0) { // added additional length check
var info = JSON.parse(xhr.responseText);
info.responseText = xhr.responseText;
// ...
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page