Add a Sidebar in Spotfire

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 4

  • @AessamL
    @AessamL 2 ปีที่แล้ว +1

    Love these "JavaScript" stuff in Spotfire!
    Please keep them coming. Thank You!

  • @jonathanmassing8065
    @jonathanmassing8065 ปีที่แล้ว

    hello, i want to know to get the value from a calculated value in text area with java script. i used the getelementByid with the id of my div and when i used alert(div.innerText) it showed nothing

    • @DrSpotfire
      @DrSpotfire  ปีที่แล้ว

      Hello Jonathan.
      Sometimes the calc value renders asynchronously. You can put a timeout to let the value make the appropriate calculation a moment.
      setTimeout(()=>{alert(div.InnerText)},1500) //wait 1.5 seconds
      Another ways is to detect when the calc value changes is by monitorin changes throung a MutationObserver:
      function myCallback(){
      console.log(div.innerText)
      }
      observer = new MutationObserver(myCallback);
      observer.observe(div,{childList:true,subtree :true})

  • @ajinkyaraut11
    @ajinkyaraut11 ปีที่แล้ว

    Great Information but please slow down. Give some time for audience to follow.