NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on May 06, 2015, 08:23:34 AM

Title: Adding a script inside de page body does not work
Post by: Alberto on May 06, 2015, 08:23:34 AM
Hi,
I have a graph script I need to insert in a page.
If I add the script in the "after scripts" embed it is shown ok but as the first element of the page.
If I move the code inside the body of the page it does not appear in the page code, like Nettalk where filtering it.
I say its Nettalk because I've made an example page.html manually and it is shown ok in the browser

This is the script (widget)

   <script type="text/javascript">
   new TradingView.widget({
      "width": 600,
      "height": 400,
      "symbol": "AAPL",
      "interval": "D",
      "timezone": "exchange",
      "theme": "White",
      "style": "1",
      "toolbar_bg": "#f1f3f6",
      "withdateranges": true,
      "hide_side_toolbar": false,
      "allow_symbol_change": true,
      "save_image": false,
      "hideideas": true,
      "studies": [ "ROC@tv-basicstudies",
      "StochasticRSI@tv-basicstudies",
      "MASimple@tv-basicstudies" ],
      "show_popup_button": true,
      "popup_width": "1000",
      "popup_height": "650"
   });
   </script>

Thanks


Title: Re: Adding a script inside de page body does not work
Post by: Bruce on May 07, 2015, 06:30:30 AM
I don't know this script, but usually you specify an item on the page that the script then uses as the root of they HTML they are adding in. From your description though it doesn't seem like you are specifying an existing element, so you need some other way of identifying where on the page the widget should go.

cheers
Bruce