Warning when upgrading to Spotfire 10

TIBCO has deprecated the JQueryUI Javascript library in the latest Spotfire 10.0 release

TIBCO Community pages show us how to use JQuery properly

Add a javascript resource file

//add a scripts to head
$.getScript("https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js", function () { 
   alert("your resource is ready!")

//add multiple scripts to head (nested when they depend on each other)
$.getScript("https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js", function () { 
      alert("your resources are ready!")


Anonymous said...

Can you please tell how to add resources in Spotfire....
I cant add resources in java script..
if possible please attach a screenshot....please

Jose Leviaguirre said...

Sometimes it work, but some times this technique does not depending on the resource. For example, I tried importing d3.js but no luck but it works with other resources, like the one I use for the gauge.

Thing does not work probably because by default, javascript needs to be unobtrusive and the spotfire engine parses the resource before loading it

Maybe if the Spotfire admin changes the setting from Administration Manager>Preferences>(Everyone)>TextArea>TextAreaPreferences>PerformHtmlSanitation:False thing might work