Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » JavaScript loaded with AJAX not executed

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 781 Views
  • DeklinKelly
    Avatar
    Community Member
    196 Posts

    JavaScript loaded with AJAX not executed Link to this post

    This JavaScript is executed if page it is on in the admin area is the one to be loaded however it does not execute if another page in the admin is loaded first and then that page is loaded.

    $fields->addFieldToTab("Root.Zooph", new LiteralField('CustomCode'.$i++,'
    <script type="text/javascript">
    /* <![CDATA[ */
    alert('Hello World');
    /* ]]> */
    </script>
    '));

    I think the problem may be that JavaScript loaded with AJAX is not being executed.

    Any ideas?

    781 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.