Ritu Goelr Posted February 21, 2020 Share Posted February 21, 2020 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. Link to comment Share on other sites More sharing options...
Khushboo Rabadia Posted February 25, 2020 Share Posted February 25, 2020 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); Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now