JavaScript
Since Spotfire v6.0, it is possible to add JavaScript to text areas using the HTML editor. It is beyond the scope of this book to review all the things you can do with JavaScript, but a common use is to improve the appearance and usability of websites by creating interactive elements such as menus and calendar pickers for date inputs. Treat the Spotfire text area as a website. You can also use JavaScript to change the content of property controls and even run IronPython scripts.
If you right-click on a text area, select Edit HTML, and click on the Insert JavaScript icon, a window will open in which you can type or paste the required JavaScript code and save it for deployment in other text areas. You can also assign parameters to the JavaScript in similar fashion to IronPython scripts.
To apply JavaScript code to text area content, including Spotfire controls such as buttons, you tag the target element with an identifier and then reference that identifier in the script. For example...