D
D
Dmitry Kim2017-08-10 12:46:40
Yii
Dmitry Kim, 2017-08-10 12:46:40

Why doesn't $this->view->registerJs() fire from a controller on ajax form submission?

Submitting a form via pjax. In the controller I write something like:

$this->view->registerJs('console.log("hello world!")');
return $this->renderAjax(/* bla bla bla */);


The response body comes without this javascript. Although in another controller similar code works. CHADNT?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question