Assigning values to document properties with Javascript not working in Spotfire 10

In my spotfire dashboard, I have a javscript which assigns the value of a calculated field to a document property. The html part is as follows:

<div id="NumberValue" style="display:none"><SpotfireControl id="334ed7b93be445159e850a55b7538ba9" /></div>

<div id="Number" style="display:none"><SpotfireControl id="c32870a7996e4d81bc843f7f465bc82c" /></div>

The javascript is:

var fun1 = function(){

    var c1 = $('#NumberValue').text().trim()

$('#Number input').val(c1).blur()

}

setInterval(fun1,100)

This stopped working after the upgrade to Spotfire 10 . Post the upgrade, the values are getting copied from the div “NumberValue” to the div “Number”, But the document property associated with the second div is not getting updated.

I tried the following work around also:

var fun1 = function(){

    var c1 = $('#NumberValue').text().trim()

$('#Number input').show()

$('#Number input').focus()

$('#Number input').val(c1).blur()

$('#Number input').hide()

}

setInterval(fun1,100)

This script was assiging the value to document property, But the focus function was activating the element each time the javascript runs. Hence we were unable to type values in other input fields in the same tab.

We cannot use the Iron python method for assigning document properties as it needs to be triggered by R datafunction and our server has limitations to handle the load.

So any javascript solutions/work arounds will be appreciated.

(2) Answers

Login