Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

JavaScript loaded with AJAX not executed


Reply


889 Views

Avatar
DeklinKelly

Community Member, 197 Posts

29 July 2010 at 12:19am

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?