question

twinkle avatar image
0 Votes"
twinkle asked Jerryzy answered

MIME error on sharepoint error

I am trying to reference a .js file uploaded to the site document library. but on ececuting it gives an error. please note that this did not exist before

code in solution
tag.src="link-to-the document.js"
tag.type=application/javascript.

But i am getting a MIME error , that says that refused to execute text/html.

where am i going wrong? also why is this issue appearing all of a sudden and it didnt exist before.

office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Jerryzy avatar image
1 Vote"
Jerryzy answered

Hi @twinkle,

Try to reference a Js file in SharePoint classic page like this, use "text/javascript" instead of "application/javascript":

84638-snipaste-2021-04-06-10-34-49.png


Thanks
Best Regards



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.