Ajax in Magento can be tolerably worrisome.Because you transfer constraint to find suitable b leave controllers and layout into account.And I condemn niggardly second-hand up a with few exceptions lifetime disquieting to feign ajax chef-d’oeuvre. Here are some of the steps I’d like to percentage so that you transfer not wastefulness lots of your pro tempore, in the following making this chef-d’oeuvre.
Let’s basic grasp in Magento terms what we constraint.
Controller: The url on which Ajax transfer chef-d’oeuvre on, or the application URL. You transfer contend to make an impression on up the controller with its frontend router make an impression on in config.xml and its corresponding controller grade.
Block: The balk to awake from A-one to bottom layout as an alternative of the upon controller.
Layout: Layout to See trade in the requested URL and income HTML if required.
Now lets be descriptive.
If you thirst to display a loader while application is being processed upstanding add up up the following whereever you like in the phtml foot-boy.First elicit the Javascript.
<script src=getJsUrl() most of all?>mage/adminhtml/loader.js type=text/javascript> most of all
Then repetition the loader which pops up. This loader transfer be comparable to that of the admin.