The script from '*' was denied because its MIME type ('text / html') is not executable and strict MIME type checking is enabled

I am using a form on my website to update Google Sheet with Google Forms. It worked fine, but lately I've started getting the above error.

Note that the data is being written perfectly, namely that the "alert" is not triggered (no response from the sheets?), So the user cannot get confirmation that his data has been written.

This is the script:

<script type="text/javascript">
 function postContactToGoogle(){
        var name = $('#name-add').val();
        var email = $('#email-add').val();
        var location=$('#location-add').val();

        if ((email !== "")) {
            $.ajax({
                url: "http://docs.google.com/forms/d/1Nt-NaXVnZYHDeEbqTypyq6ZUMKPk9of4fW_U5eaiLjg/formResponse",
                data: {"entry.555826589" : name, "entry.2022783192" : email, "entry.128132944": location},
                type: "POST",
                dataType: "jsonp",
                statusCode: {
                    0: function (){
                        $('#name-add').val("")
                        $('#email-add').val("")
                        $('#location-add').val("");

                        //Success message
                        alert("Sweet! We will get in touch soon.");

                    },
                    200: function (){
                        $('#name-add').val("");
                        $('#email-add').val("");
                        $('#location-add').val("");
                        //Success message
                        alert("Sweet! We will get in touch soon.");
                    }
                }
            });
        } else {
            //Error message
            alert("Email is required");
        }
    }

      

PS: My site is hosted by Blogger.

+3
javascript mime-types form-submit google-drive-sdk


source to share


No one has answered this question yet

Check out similar questions:

591
Strip HTML from Text JavaScript
418
Explanation <script type = "text / template"> ... </script>
312
Chrome says, "The resource is interpreted as a script, but passed in with a MIME / plain text type." What gives?
269
Stylesheet not loaded due to MIME type
one hundred
duplicate MIME type "text / html"?
45
Script denied, strict MIME type checking enabled?
1
Scripted because the MIME type ('text / html') is not executable and strict MIME type checking is enabled
1
Refused to execute the script because its MIME type ('text / html') is not executable and strict MIME type checking is enabled
1
Script was denied because strict MIME type checking was enabled
0
JQuery call on success or completion



All Articles
Loading...
X
Show
Funny
Dev
Pics