0

I have some javascript that is only required when a certain jQuery dialog is loaded. I have put it in an external file and referenced it in the controller as:

$this->view->inlineScript()->appendFile('/theme/flat/scripts/new-post.js');

In my new-post.ajax.phtml file I have the following line:

<?=$this->inlineScript();?>

But I just can't get it to work. There are no script tags or content inserted.

If I put the same code in a non-ajax controller and view it works fine.

Is it possible that the ajaxContext action helper disables the inlineScript view helper? Why? And is there a way around it? (I have quite a few snippets I am pulling in with ajax, and each has its own javascript code).

4

0 回答 0