Javascript get value of Document Property or Calculated Value not working


I'm having troubles trying to pass a value from a label to javascript.

I've already searched a lot of topics about it here, but none of them worked for me.

I tried to replicate this example:

But it didn't work. I've attached in this post my attempts.

My Spotfire version is 7.14

HTML Code:

Count of "JBF A" with label: 

<DIV id="labelJBF"><SpotfireControl id="2e9830d4a91b405ba7628907457683f8" /></DIV>

<DIV>Count of "JBF A" with Calculated Value:&nbsp; </DIV>
<DIV id="calcVV"><SpotfireControl id="565dce68145e4374bceec2a4f9ad4ee3" /></DIV>

<DIV>Count of "JBF A" manual:&nbsp; </DIV>
<DIV id="manualV">6</DIV>

Javascript Code:


var labelVal = $("labelJBF").text();
alert('Label >> ' + labelVal);

var calcV = $("calcVV").text();
alert('Calculated Value >> ' + calcV);

var manualVal = $("manualV").text();
alert('Manual >> ' + manualVal);

var calcID = $("2e9830d4a91b405ba7628907457683f8").text();
alert('Directed ID >> ' + calcID);


As you can observe, i tried to get the value with javascript from Label, from calculated value, manually inputted, direct from spotfire ID.. But in all of them, alerts appear blank, like these:




Image icon doubt.png88.82 KB
Binary Data js_get_value.dxp249.49 KB

(2) Answers