I'm trying to call a function inside controller that will return a echo
but I get error as result show inside my id #ly-id-result
{"success":false,"message":"View not found [name, type, prefix]: places, raw, hpj_storemanagerView","messages":null,"data":null}
My Ajax call in : httpdocs/modules/mod_storemanager_map/tmpl/default.php
var ly_inputVal = document.getElementById("ly-val-inp").value;
jQuery.ajax({
url: "index.php?format=raw&option=com_storemanager&task=abc",
data: {text:ly_inputVal},
method: "POST", //Use post method
cache: false, //Specify no cache
success: function(result){
//console.log(ly_inputVal);
jQuery("#ly-id-result").html(result);
}
});
in my controller in : httpdocs/components/com_storemanager/controller.php
public function abc()
{
// Get Joomla's input object:
$input = JFactory::getApplication()->input;
// Get the variable
$value = $input->get('ly_inputVal');
return $value;
}