We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15083
    • 697 Posts
    Hi folks....

    I have a simple question. When I create a snippet to build up some dynamic javascript and put it out, it does not work at all. In fact when I try and put out any javascript in a snippet using the API nothing comes out. Am I doing something silly?

    I event tried pasting the example from the documentation straight into a snippet however the js does not show up ANYWHERE in the output page????

    $src = "<script type=’text/javascript’>
    runSlideShow(’slides’);
    </script>";
    $modx->regClientScript($src);

    Please HELP!!!
      • 15083
      • 697 Posts
      I like talking to myself....if you can’t listen to yourself than who can you listen to eh?

      The problem above seems to be a general problem I have getting the API functions to do ANYTHING.

      $modx->function call seems to do ABSOLUTLY NOTHING FOR ME?

      Im obviously doing something terribly wrong...as the inbuilt snippets are working fine.
      Can anyone help a total noob?
        • Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 15083
          • 697 Posts
          thanks sottwell...

          I found that post when I was trawling through the forum. I have since fixed the bug in the function.

          Cheers,

          Justin.