title: how to call controller with jquery ajax magento
body: <p>I have created custom module in magento, I want to access controller using jquery ajax but I am not finding correct method for doing this.<br>
  Ajax code in template is </p>
  
  <pre><code> jQuery(".deleteAttrKeyId").on("click",function(){
        var baseUrl="&lt;?php echo Mage::getBaseUrl();?&gt;";
        var idArr=this.id.split("-");
        attrKeyId=idArr[1];
        alert(this.id);
        jQuery.ajax({
          type: "POST",
          dataType: "JSON",
          data :{'id':attrKeyId},
          url :baseUrl+"groupprice/adminhtml_grouppricebackend/index",
          complete:function(){alert("completed");
            },
          success:function(result){
            alert(result);
            }
  
          });
      });
  </code></pre>
  
  <p>Block code in layout is </p>
  
  <pre><code>&lt;groupprice_adminhtml_grouppricebackend_index&gt;
  &lt;reference name="content"&gt;
  &lt;block type="groupprice/adminhtml_grouppricebackend" name="grouppricebackend"  template="groupprice/grouppricebackend.phtml"/&gt;
  &lt;/reference&gt;
  &lt;/groupprice_adminhtml_grouppricebackend_index&gt;
  </code></pre>
  
  <p>Controller code is </p>
  
  <pre><code>&lt;?php
  class Group_GroupPrice_Adminhtml_GrouppricebackendController extends     Mage_Adminhtml_Controller_Action
  {
  public function indexAction()
  {      
   echo  __FILE__;
  }
  }
  </code></pre>