We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to route ajax request? | Forum

Topic location: Forum home » Support » General Questions
Afsal Y
Afsal Y Jan 18 '17
I was developing a new module,  unable route ajax request. Routed as normal, but html not found error is coming.


Please help me

Afsal Y
Afsal Y Jan 18 '17
figured out myself
Sean
Sean Apr 11 '17
When using an ajax controller action make sure you exit out of the function, do not use return otherwise it will look for a .html file for the controller function.


Use something like:


exit(json_encode(array('result'=> success', 'message'=> 'Whatever value you want to return')));


Or if you do not want to return any values just use:


exit;

The Forum post is edited by Sean Apr 11 '17
Steven Billy
Steven Billy May 18 '18
same problem...


Steven Billy

Web Developer

The Forum post is edited by Oxwall Germany Jul 29 '18