How to access Text Area Document Property control values using Java Script/JQuery.
book
Article ID: KB0076737
calendar_today
Updated On:
Products
Versions
Spotfire Analyst
All Versions
Description
It is often required to be able to access Document property Control values (Input/drop-down/List-box, etc.) that are part of the Text Area from the JavaScript/JQuery associated with any given HTML Text Area. Since the JavaScript that has been added to the HTML Text Area is a client-side programming language, it does not have access to the Spotfire Document model framework. Use the approach described in the following example to fetch the values.
Issue/Introduction
How to access Text Area Document Property control values using Java Script/JQuery.
//For Drop down var dropdownVal = $("#c3dace8ed60e47b2a0b6d59cc6c5d021 :selected").text() alert('Drop down >> ' + dropdownVal)
//For List Box var listBoxVal = $("#202f94483ee142a6b604c25d452b221a :selected").text() alert('List Box >> ' + listBoxVal)
It is recommended to wrap your property controls with an element, e.g., a div with id='inputWrapper' . You can then get its value. This is because your property control ID may change (mostly in Web Player).