Joomla Ajax Request Error

373 Views Asked by At

I got following error

Method get_slotsAjax does not exist

my call in healper file

 xmlhttp.open("GET","?option=com_ajax&module=quickcontact&method=get_slots&format=json",true);

my function call

public function get_slots()
{
 ....
}

Went by this documentation.

What am I Missing?

1

There are 1 best solutions below

0
Irfan On

Your method name must end with "Ajax" as mentioned in the documentation.

NOTE: All methods must end in Ajax.

For example:

method=mySuperAwesomeMethodToTrigger will call mySuperAwesomeMethodToTriggerAjax

So your method name would be as there in the error

get_slotsAjax