1

i send a ajax request to joomla component controller but not getting any return data

controller

<?php

defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.controller');

class igalleryControllerajaxraw extends JControllerLegacy
{

    public function ajaxrequest()
    {

    try
    {
      echo $anyParam = JFactory::getApplication()->input->get('name');


    }
    catch(Exception $e)
    {

    }
 }
}

Ajax Request

 jQuery.ajax({ 
         type: "get",
         data:"name=myname",
         url: "index.php?option=com_igallery&task=ajaxraw.ajaxrequest",  
         success: function (data) {  
          alert(data);
         }

    });  

i do every possible things but not getting solution

Aslam Patel
  • 874
  • 6
  • 19

1 Answers1

0

This is not a solution to your problem. But an idea to find the problem. You can use Chrome's built in developer console or Firebug addon on firefox. They will show the ajax request when invoked, and all reports related to the Javascript errors, Get/POST request done trough ajax . You can find whether the Ajax request result in http error looking in to its HTTP status code of the request .