I’m trying to make a joomla component and I would like to use it the given possibilities from ajax jquery. The task would be to make threw ajax querys from database and to output the result.
to send the data I’m using the following javascript
$(".searchBtn").click(function(){
$('.default_order').hide();
//show the loading bar
showLoader();
$('#sub_cont').fadeIn(1500);
$("#content #sub_cont").load("?option=com_glossary&task=displayvalues&format=raw?val="+ $("#search").val(), hideLoader());
});
what actually should send a variable in string form to my controller, but when I’m checking if the variable existing or not doesn’t output anything
public function getvalues(){
$rec = $this->checkValues(JRequest::getVar('val'));
echo $rec;
}
every comment would help
thank you
I assume it’s this:
Shouldn’t this be
? I would also suggest to serialize the contents of
#searchotherwise you could get in trouble with URL encoding: