2
new Ajax.Request('<?php echo $this->getUrl('adminhtml/notification/check') ?>', {
        //parameters: {isAjax: 'true', form_key: FORM_KEY},#
        method: 'post',
        onSuccess: function(transport) {
            try {
                    $('notification').replace(transport.responseText);
            }
            catch (e) {
                $('notification').replace(transport.responseText);
            }
        }
    });

I'm making this ajax request in an adminthml page. It makes the page modal and waits for the ajax request to complete showing the user please wait and the spinner, the user cannot click anywhere in the page whilst the spinner / ajax request is active.

I would like to disable the modal please wait spinner for this particular ajax request as I want it to update a div automatically in the background.

3

found the answer, to unregister the varienloaderhandler

new Ajax.Request('<?php echo $this->getUrl('adminhtml/notification/check') ?>', {
        //parameters: {isAjax: 'true', form_key: FORM_KEY},#
        method: 'post',
        onCreate: function(request) {
            Ajax.Responders.unregister(varienLoaderHandler.handler);
        },
        onSuccess: function(transport) { 
            Ajax.Responders.register(varienLoaderHandler.handler);
            try {
                    $('notification').replace(transport.responseText);
            }
            catch (e) {
                $('notification').replace(transport.responseText);
            }
        }
    });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.