How to use jquery function inside of controller functions in cakephp 2?

Hi,

I want to show loader image when i submit sing-in button, The form is directly submitted to controller and it redirect to main page. How i put jquery loader in controller function?

Thanks to advance.

jQuery is client side, and your controller is server side. You can not mix them.

I guess what you want is placing the loader in your view file and call a controller via ajax.

Check this https://book.cakephp.org/3.0/en/views/json-and-xml-views.html

Than clarify your question

Understood .

Thank you rrd.