I have created a module that is accessible in admin. In that module i have created a form in the .phtml(template) file and after validating it through javascript i want to save the values in the database in products table. I have searched a lot but i could not make a call to the script! Please guide me how can i send the call to php script and get the data successfully, what modules, controllers etc i have to create to do that? Here is my module structure that is making ajax call,
code->local->myspace->mymodule->(model,controllers,etc,helper) and i have included template file in adminhtml->default->default->templates.
config.xml:
<?xml version="1.0"?>
<config>
<modules>
<Inchoo_CoffeeFreak>
<version>0.1.0</version>
</Inchoo_CoffeeFreak>
</modules>
<global>
<blocks>
<coffefreakblock1>
<class>Inchoo_CoffeeFreak_Block</class>
</coffefreakblock1>
<coffefreakblock2>
<class>Inchoo_CoffeeFreak_Block_EditSpecial</class>
</coffefreakblock2>
</blocks>
<helpers>
<coffefreakhelper1>
<class>Inchoo_CoffeeFreak_Helper</class>
</coffefreakhelper1>
</helpers>
</global>
<admin>
<routers>
<samplerouter1>
<use>admin</use>
<args>
<module>Inchoo_CoffeeFreak_AdminControllersHere</module>
<frontName>admin</frontName>
<modules>
<sintax after="Inchoo_CoffeeFreak_AdminControllersHere">Mage_Adminhtml</sintax>
</modules>
</args>
</samplerouter1>
</routers>
</admin>
<adminhtml>
<menu>
<mymenu1 translate="title" module="coffefreakhelper1">
<title>PrintInfo</title>
<sort_order>20</sort_order>
<children>
<!-- Note the misleading "module" attribute.
It actualy refers to one of the declared helpers -->
<myitem1 translate="title" module="coffefreakhelper1">
<title>Add configuration</title>
<action>samplerouter1/FreakOut</action>
<sort_order>1</sort_order>
</myitem1>
<myitem2 translate="title" module="coffefreakhelper1">
<title>Change configuration</title>
<action>samplerouter1/FreakOut2</action>
<sort_order>2</sort_order>
</myitem2>
</children>
</mymenu1>
</menu>
</adminhtml>
</config>