In this specific case, rather than trying to hide the error, you might be able to avoid it altogether (or point your supplier to this post to fix their JavaScript):
- Maybe the server returns no value at all for the "opened tabs" in the JavaScript below; try to change the widget's tabs settings to force the server to set some value. If you cannot do this in the wallboard, then try in a regular browser, hoping such would save the settings to the server.
When this doesn't help, try the following in a "regular" Internet Explorer browser:
Maybe the domain of the URL you're using is different from the one from which the script is loaded (or: the URL from which the widget loads its HTML or data), making IE feel it's handling a third-party cookie. So: see what allowing third-party cookies gets you. See Microsoft's Block, enable, or allow cookies.
Maybe setting or reading cookies in JavaScript needs some additional rights. So: see if adding daviker.whccs.com
to the trusted sites helps, to allow it to do a bit more? See Microsoft's Security zones: adding or removing websites.
Maybe the server has already set a cookie with the same name, but marked it as HttpOnly, making it inaccessible from JavaScript. Try deleting any existing "active-tabs" cookie.
Background:
The error on line 1546 of the script is related to a specific cookie not being available to that script, right after the very same script tried to set/change that cookie itself (on line 1541, where its value might actually be undefined
as line 1533 fails to check for that):
1527 restoreTabsFromTheServer: function()
1528 {
1529 $.post("xrm_ui?get=getTabs", {}, function(responce) {
1530
1531 reportTabs.tabCaptions = responce.reportPages;
1532
// Next line only checks for an empty "openedtabs", not for
// an undefined or null value; bad coding...
1533 if (responce.openedtabs == '')
1534 {
1535 $.cookie("active-tabs", '');
1536 reportTabs.tabidSelected = undefined;
1537 reportTabs.tabindexSelected = undefined;
// Next line would exit the function if we had an empty
// result, but not if it is undefined or null
1538 return false;
1539 }
1540
// Next line: NO ERROR WHILE WRITING, but the new value could
// be undefined, which might even clear an existing cookie?
1541 $.cookie("active-tabs", responce.openedtabs);
1542 reportTabs.tabidSelected = responce.tabidselected;
1543 reportTabs.tabindexSelected = responce.tabindexselected;
1544
1545 // restore tabs
// Next line: NO RESULT WHEN READING
1546 var arr = $.cookie("active-tabs").split(',');
1547 ...
So, it seems that the embedded IE is ignoring the JavaScript setting that cookie, or the JavaScript sets the cookie to be undefined. And then when trying to read back its value it's empty†.
I don't know if the embedded IE component uses the "regular" IE browser settings for cookies. But I have surely seen embedded IE components share cookies with the IE browser. (Like when clicking links in Excel when IE is not the default browser, IE cookies are still used for some discovery.) So, maybe changing the settings in the "regular" IE browser will allow JavaScript to set this cookie in the embedded component.
† Alternatively, maybe the value that is received from the server in line 1529 is not a valid value, making the writing or reading fail. Like commas are not allowed in cookies, so the .split(',')
looks suspicious. But then: we don't even know which jQuery plugin is used for $.cookie
, so we'd need much more detail to figure out if it is using some encoding.