SCRIPT5009: 'Formdata' is not set

Asked

Viewed 1,086 times

1

The Formdata tag is being displayed undefined. IE does not recognize.

    var formAnexo = null;
    if ($("#anexarArquivos").attr("enctype") == "multipart/form-data") {
        formAnexo = new FormData($("#anexarArquivos").get(0));
    }
  • 2

    Daniela, you can also put your HTML to understand the question better. And by the way, which library are you using, and what is Formdata? a jQuery plugin? Mootools?

1 answer

1

Formdata (that is part of the Xmlhttprequest Level 2) is not supported in lower IE versions than IE10 or when you are using some compatibility mode.

You can see the support matrix here.

But if you have to support EI below IE10 you can use polyfill juri.js.

If your page is running erroneously in compatibility mode consider telling IE that you want to use the latest version by placing the meta tag in the head as below:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

Browser other questions tagged

You are not signed in. Login or sign up in order to post.