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


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

Than clarify your question

Understood .

Thank you rrd.