Product: TIBCO Spotfire®
Execution of Javascript failed: Cannot read property 'xxx' of undefined
It has been observed when upgrading to 10.0 and higher, some of the JavaScript implemented in Spotfire Text Area may fail to execute and error out with the below stack trace:
Execution of Javascript failed:
Type: TypeError
Message: Cannot read property 'xxx' of undefined
Stacktrace: TypeError: Cannot read property 'xxx' of undefined
The same can also be seen logged in console under Developer Tools (Tools > Development > Developer ) of Spotfire Analyst.
In such cases, users should consider following the guidelines from the below wiki article:
How to use jQuery and jQueryUI in Text Areas
https://community.tibco.com/wiki/how-use-jquery-and-jqueryui-text-areas
Below are the steps at high level that are to be followed with respect to the wiki article:
- Download the analysis named jQueryUI-in-a-custom-javascript-10-0.dxp that is available as an attachment in the community article at:https://community.tibco.com/wiki/how-include-your-own-instances-jquery-and-jqueryui-text-areas
- Open analysis jQueryUI-in-a-custom-javascript-10-0.dxp
- Right click > Edit HTML > and copy the script 'jQuery and jQueryUI' into your analysis.
- Now in the Edit HTML dialog of your analysis, add the above script and position it as the first script in the list of Scripts.
- Ensure that you have also added the Script parameter 'styleContainerId' with the value as 'style-container'
- Add the below div tag to the HTML Text Area
<div id="style-container"> <!-- This element serves as a container for style elements added by the jQueryUI script. --> </div>
- And in all your JavaScript code you need to add the below line of code at the beginning.
var $ = window.CustomJQuery;
https://community.tibco.com/wiki/how-include-your-own-instances-jquery-and-jqueryui-text-areas
Comments
0 comments
Article is closed for comments.