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

Adding buttons programatically

So I think innerHTML or any such functions do not work (off google). Are there any solutions to adding (for example) buttons to a list of buttons programatically ?

 

 

Best Answer
0 Votes
3 REPLIES 3

I am not sure I understand the question. Do you want to create a button dynamically?

 

innerHTML is not working like this, if you want innerHTML use document.getElementById('something').text

Best Answer
0 Votes

There is currently no way to add elements programmatically.

Best Answer

If it's a list of buttons, you might be able to make it work with the Virtual Tile List.

 

It's built from an array, so you could add to the array, then tell it to redraw.

 

Some examples here https://community.fitbit.com/t5/SDK-Development/Example-for-VirtualTileList/m-p/2677410

Best Answer
0 Votes