Search the Community

Showing results for tags 'javascript error dispose ajax'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Company Forums
    • Company News
  • Product Forums
    • FusionCharts XT
    • FusionWidgets XT
    • PowerCharts XT
    • FusionMaps XT
    • Collabion Charts for SharePoint
    • jQuery Plugin for FusionCharts
    • AngularJS plugin
    • ReactJS plugin
  • General Forums
    • FusionCharts Jobs and Consultation
    • FusionLounge

Found 1 result

  1. Hi, I encountered the following js error (FusionCharts.HC.js) when trying to dispose charts on IE8 from ajax rendered tabs (richfaces tabs) : Unable to get property 'removeChild' of undefined or null reference To give a little more context, i have some ajax rendered tabs each of them rendering some charts. When a tab switch is performed, current tab charts are rendered and i need to dispose previous ones. I am checking that the FusionCharts instance exists before calling .dispose() but it doesn't help : var chart = FusionCharts(chartId); if(!!chart) chart.dispose(); Indeed the FusionCharts instance exists but the associated html5 markup is no longer in the DOM (due to the ajax re-render) and it seems that the part of the dispose method responsible of removing the markup from the DOM is still called. Debugging reveals that the error comes from the line 'this.canvas.parentNode.removeChild(this.canvas);' (FusionCharts.HC.js) where 'this.canvas.parentNode' is null : b.prototype.remove = function () { K("raphael.remove", this); this.canvas.parentNode.removeChild(this.canvas); for (var c in this) this[c] = typeof this[c] == "function" ? b._removedFactory(c) : null; return !0 }; Maybe some tests can be added to be sure that chart markup is present before trying to remove it ? I temporarily bypassed the problem by adding a null check before the removeChild() call. Also there is no error on chrome nor firefox.