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

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
TWendt
Posts: 109
Joined: Mon Sep 08, 2014

01 Jul 2020

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

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

01 Jul 2020

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?

TWendt
Posts: 109
Joined: Mon Sep 08, 2014

01 Jul 2020

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

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

02 Jul 2020

Hello Tom,

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

Thank you!

TWendt
Posts: 109
Joined: Mon Sep 08, 2014

06 Jul 2020

Hi,

here is the screenshot.

Best wishes
Tom
Attachments
MSEdge-Calculate-Problem.JPG
MSEdge-Calculate-Problem.JPG (172.02 KiB) Viewed 10198 times

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

07 Jul 2020

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.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests