Skip to content

Instantly share code, notes, and snippets.

@Luxato
Last active October 25, 2018 10:22
Show Gist options
  • Save Luxato/ebf5c34fd39a9a3895ccd68f04c1495f to your computer and use it in GitHub Desktop.
Save Luxato/ebf5c34fd39a9a3895ccd68f04c1495f to your computer and use it in GitHub Desktop.
Magento 1 send ajax request.
new Ajax.Request("<?= Mage::helper('adminhtml')->getUrl('adminhtml/password/securitycheck') ?>", {
method: 'POST',
parameters: {'password': password},
requestHeaders: {Accept: 'application/json'},
onSuccess: function(response){
// Parse text as JSON
response = JSON.parse(response.responseText);
// Redirect
window.location.href = deleteURL;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment