Setting Titles using element ID for multiple symbols


I hope someone can help, I am trying to automate adding several symbols and their respective content via the follwoing, however this works for one symbol but when I have several of these symbols it uses the last to update, is there a way I use ‘this’ for this purpose? (20.8 KB)

(Hans-Gerd Claßen) #2

I would use an underscoreseparator for the symbol-ids and do sthg like this onsymbolload:

var locations ='_');
element.getElementsByClassName('locationCountry')[0].textContent = locations[0];
element.getElementsByClassName('locationCity')[0].textContent = locations[1]; (332.9 KB)


brilliant thank you Hans.