I'm designing an app that uses an element that refreshes the page. The problem is that when the webpage loads I use a for loop to create all the elements. Because of this element that refreshes the page, every time it does it calls the for loop again. This causes problems as you can imagine. Any idea how I can stop this? I'm tempted to set a boolean but if there is another way I will take it.