Changing table values at time intervals

Hello hype enthusiasts!

I would like to use my function so it continues to change the data in each row of the table. At the moment it simply changes the data in the first row and that is it.

I would like it to add data into the next row and then the next row etc at a set time interval such as every second. I would guess this would require using:

  1. setInterval()

  2. a loop to increase the row number by 1 each time

The syntax for this is beyond my very limited coding skills and small brain but I know someone out there could do this as easily as breathing air.

Any help would be greatly received.

Thanks in advance! (17.5 KB)

:rotating_light: Please note that we can only address JavaScript questions and issues in the context of Tumult Hype, so please attach a Hype document so others can dig into what you have so far.

Just going with what you are doing..

Add more timeline actions like your first one to each second in the boxMove timeline.

Then in you function just use the timeStamp.toFixed(0) as a int and add 1 to it.

var row = parseInt(timeStamp.toFixed(0)) + 1

The row var can then be used as the row int.

var cells_ = document.getElementById("myTable").rows[row].cells;

valuesToTable.hype (42.9 KB)


Thank you so much for such a speedy and simple solution that even I can understand! You are very kind.

1 Like