4 Replies Latest reply: May 5, 2012 4:23 AM by Ryan Rutan RSS

    Javascript in HTML widget?

    dkcrew

      Hi all,

      I am trying to add some javascript to my HTML widget to customize a page.  However it seems to hate javascript!

      Here is an example of a failed attempt on my part to use javascript in the html widget:

      <div id='hello'></div>

      <script type='text/javascript'>

      function test(){

        document.getElementById('hello').innerHTML='hello';

      }

      </script>

      test();

       

      Whenever I try to sneak a <script> into the html it deletes it after I've saved the changes.

      However in the description to HTML widget it says you CAN add javascript

      What am I missing?

       

      Thanks and Cheers,

      Dk