Sunday, 11 August 2013

xhr.responsetext returns null or indefined

xhr.responsetext returns null or indefined

In the Magento site we are developping the error -
Exception:TypeError:Cannot read property ínnerHTML'of undefined - shows
when we use the MDL ajax cart. I found out that the extension Total Slider
Manager which uses ajax also influences the issue. When I set the module
to false in app/etc/modules, the cart works normally. The extension code
is encrypted and the developer had a look but didn't come with a solution.
This is the code which induces the error:
onComplete: function (xhr)
{
var responseHTML = xhr.responseText;
$('mdl-temp-div').innerHTML = responseHTML;
var return_message =
$('mdl-temp-div').down('.mdl_ajax_message').innerHTML;
var middle_text = '<div
class="mdl-cart-bts">'+$('mdl-temp-div').down('.back-ajax-add').innerHTML+'</div>';
$('mdl_ajax_confirm').innerHTML = '<div
id="mdl_ajax_confirm_wrapper">'+return_message + middle_text +
'</div>';
var link_cart_txt =
$('mdl-temp-div').down('.cart_content').innerHTML;
$$('.top-link-cart').each(function (el){
el.innerHTML = link_cart_txt;
});
The responsetext returns Null or undefined. (It is probably set to
undefined in the Total Slider Manager module). Is there a way to get the
responseText for this function on this page?

No comments:

Post a Comment