So this is my module structure:

This is the content of config.xml:
<?xml version="1.0"?>
<config>
<modules>
<Netgr_Gradd>
<version>1.0.0</version>
</Netgr_Gradd>
</modules>
<global>
<blocks>
<netgr_gradd>
<class>Netgr_Gradd_Block</class>
</netgr_gradd>
<adminhtml>
<rewrite>
<catalog_product_attribute_set_main>Netgr_Gradd_Block_Adminhtml_Addgroup</catalog_product_attribute_set_main>
</rewrite>
</adminhtml>
</blocks>
<helpers>
<netgr_gradd>
<class>Netgr_Gradd_Helper</class>
</netgr_gradd>
</helpers>
</global>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<netgr_gradd after="Mage_Adminhtml">Netgr_Gradd_Adminhtml</netgr_gradd>
</modules>
</args>
</adminhtml>
</routers>
</admin>
</config>
This is the content of adminhtml.xml :
<?xml version="1.0"?>
<config>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<netgr_gradd before ="Mage_Adminhtml">Netgr_Gradd_Adminhtml</netgr_gradd>
</modules>
</args>
</adminhtml>
</routers>
</admin>
</config>
This is the content of the Addgroup.php from my Block :
class Netgr_Gradd_Block_Adminhtml_Addgroup extends Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main
{
protected function _construct() {
//This should just be a copy of catalog/product/attribute/set/main.phtml so you can edit it
$this->setTemplate('netgr/gradd/group.phtml');
}
public function _prepareLayout() {
$this->setChild('my_button',
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
'label' => Mage::helper('catalog')->__('Add Group'),
'onclick' => 'editSet.addGroupFront();',
'class' => 'add-group'
)));
return parent::_prepareLayout();
}
public function getYourButtonHtml() {
return $this->getChildHtml('my_button');
}
}
It is an extended class. and this is the content of the controllers/Adminhtml/AddgroupController.php:
<?php
class Netgr_Gradd_Adminhtml_AddgroupController extends Mage_Adminhtml_Controller_Action
{
public function indexAction(){
}
public function saveAction(){
echo 111;
}
}
I created a template, where i actually do the ajax stuff:
save : function() {
$('messages').update();
TreePanels.rebuildTrees();
var _validator = new Validation('set_prop_form', {onSubmit:false});
if( !_validator.validate() ) {
return;
}
editSet.req.attribute_set_name = $('attribute_set_name').value;
if (!editSet.req.form_key) {
editSet.req.form_key = FORM_KEY;
}
list_of_group = "";
$$(".add_new_frontend_group>a>span").each( function (val,i) {
list_of_group = list_of_group +"^"+ val.innerHTML;
});
alert('<?php echo $this->getMoveUrl() ?>');
var req = {data : Ext.util.JSON.encode(editSet.req)};
var con = new Ext.lib.Ajax.request('POST', 'http://attin.netlogiq.eu/magento_new/index.php/admo/netgr_gradd_adminhtml_addgroup/save', {
success:editSet.success,
failure:editSet.failure
}, req);
},
This stuff is prototype js. There is smth wrong with the ajax url, it gives me the 404 page. What is wrong with my url?