Jump to content

Recommended Posts

Posted

Hi,

 

I am trying to use the calculated value in javascript document property but it always showing blank values for me in Spotfire X. I am using below snippet for the same

 

var val3 = document.getElementById('calcValue');

value=$("#calcValue").text().trim();

 

Can anyhelp pease suggest.

Posted

You can try this below snippet in textarea using MutationObserver -

https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver

 

 

 

 

callback = function(){

var myValue = $("#calVal").text().trim(); //calculated value

$("#inpVal input").val(myValue).blur(); //Input field document property

}

var observer = new MutationObserver(callback);

var targetNode = document.getElementById('calVal');

var config = { attributes: true, childList: true, subtree: true };

observer.observe(targetNode, config);

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...