We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15175
    • 116 Posts
    regClientStartupScript does not seem to do anything for me , and I am wondering if I am missing out something basic.

    Here is my snippet [[reg-swfobject]] :

    <?php
    $src="<script type="text/javascript">
    			swfobject.registerObject("main-flash", "9.0.0");
    	    </script>";
    $modx->regClientStartupScript($src);
    ?>


    I include the snippet call [[reg-swfobject]] in my template (I’ve tried a few different locations). Viewing the page source shows that the code has not been added to the head.

      • 15175
      • 116 Posts
      OK, got it sorted - I should have been using single quotation marks within the double ones.