Page 1 of 1

Resource interpreted as document but transferred with MIME type image/gif

Posted: 01 Jul 2020
by TWendt
Hi all,

I have an MS Edge problem. In my form I have a refresh button with a OnClick event:

fd.onsubmit(function() {
var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', 'fd_Item_Edit.aspx?ID=');
fd.sourceFormParam(uri);
return true;
});
fd.save().click();

When I use the Internet Explorer, everything works fine. If I use MS Edge, the following error occurs.

Resource interpreted as document but transferred with MY-URL MIME type image/gif https://url/_layouts/15/images/blank.gif

when the following script runs

//Calculate Hardware
var total = 0;
var rows = fd.relatedItems(3).data('ctx').ListData.Row;
rows.forEach(function(item) {
total += parseFloat(item['Kosten.'])
total_overall += parseFloat(item['Kosten.'])
});
fd.field('Kosten_x0020_Hardware_x0020__x00').value(Number(total.toFixed(2)).toLocaleString("de-DE", {style: "currency", currency: "EUR"}) + ' €');

Can you help?

Best wishes
Tom

Re: Resource interpreted as document but transferred with MIME type image/gif

Posted: 01 Jul 2020
by mnikitina
Hello TWendt,

I couldn't reproduce the error on my side.

Which version of SharePoint are you using: Online or On-On-premises?

What version of Edge are you using?

When should the Calculate Hardware function be executed?

Re: Resource interpreted as document but transferred with MIME type image/gif

Posted: 01 Jul 2020
by TWendt
Hi,

I use SharePoint 2013 on-Premise, the version from Edge is 83.0.478.58. The Calculate Hardware function is executed by pressing the refresh button.

Best wishes
Tom

Re: Resource interpreted as document but transferred with MIME type image/gif

Posted: 02 Jul 2020
by mnikitina
Hello Tom,

Could you please share the screenshot of the errors in the browser console(F12).

Thank you!

Re: Resource interpreted as document but transferred with MIME type image/gif

Posted: 06 Jul 2020
by TWendt
Hi,

here is the screenshot.

Best wishes
Tom

Re: Resource interpreted as document but transferred with MIME type image/gif

Posted: 07 Jul 2020
by mnikitina
Hello Tom,

Those errors are not related to the code you are using.

Please, try adding this after each line inside the button's click event:

Code: Select all

debugger;


This will allow you to test what goes wrong. Simply open the browser's console, click the button, and it should guide you through each line of code it executes. Please do so in both IE and Edge browsers.