NetTalk Central

Author Topic: Adding a script inside de page body does not work  (Read 3038 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Adding a script inside de page body does not work
« 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


-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Adding a script inside de page body does not work
« Reply #1 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