0

I am trying to figure out if this is a "feature" or an issue. I am making a SSRS call and getting a html string of a report. I need to remove an image and update the link around the image with a CSS class. The code below does what I need it to do, except that it still makes the call to the server to the retrieve the image, which doesn't exists. Is this a feature of chrome/firefox? Is there another way to remove the image from a html string with out making the call to the server to retrieve the image?

var endingHtml = $(data.ResultsAsString).find("a[href*='ShowHideToggle']").each(function (index, element) {
    $(element).attr("class", $(this).children("img[src*='TogglePlus']").length > 0 ? "fa fa-plus-square" : "fa fa-minus-square");
    $(element).children("img").remove();
}).end();

$("#currentReport").html($(endingHtml));
Rodney Pannell
  • 330
  • 5
  • 16

0 Answers0