If I hardcode a symbol the widget works fine. Any attemps I made such as using quotes/noquotes, or trying elements (I probably don't have enough knowledge) always comes back "something gone wrong". Does somebody have the solution, deleting the commented line and instead using var? (I want to prompt for sym, that is why it can not be hardcoded)
<script> var sym = "MSFT" </script>
<div class="tradingview-widget-container";>
<script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-tickers.js" async>
{ "symbols": [
{ "title": "MSFT", "proName": "MSFT"},
<!--{ "title": "MSFT", "proName": sym }, does not work -->
{ "title": "SPY", "proName": "SPX" }
],
"locale": "en" }
</script> </div>
Running the snippet here gives a script error, but pasting it for example into https://codepen.io/pen/ or http://htmledit.squarefree.com/ or local html file runs just fine when deleting the commented line.