Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

changing view-header text

Greetings brains trust,

 

I am trying to use the View thing with the header.  I have the following code to create the header

 

    <use href="#view-header" height="50" fill="fb-peach">
      <set href="#text" attributeName="text-buffer" id="myTime" to="Annoying" />
      <!--<text id="myTime">Something</text>-->
    </use>
    <use href="#scrollview-item" height="250">
      <rect width="100%" height="100%" fill="fb-red"/>
    </use>

And trying to make a change to it using javascript with ....

const myTimer = document.getElementById("myTime");
myTimer.to = `${nowHours}:${nowMins}:${nowSecs}`;

If I put the data to console, it displays, so I know that is working. but the following just gives me this error

Unhandled exception: TypeError: Cannot set property 'to' of null

I have tried with a text tag with the same result.

Any ideas?

Best Answer
0 Votes
0 REPLIES 0