Quantcast
Viewing all articles
Browse latest Browse all 3527

Micosoft Edge cannot read local files with ajax method of JQuery

I'm creating a program to access local files using the ajax method of JQuery.
This program is working correctly in IE11 and older version but failing in microsoft edge browser.

It is showing the 'Network error ' for the same and going to error section in Microsoft Edge.

Can someone let me know the workaround for the same.

Here is my code :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="js/jquery-1.11.3.min.js"></script>

<script>
$("document").ready(function(){
    BrandAllMenu();
});

function BrandAllMenu() {
           var  xmlPath = "branding.xml";
           $.support.cors = true;
            $.ajax({
                type: "GET",
                url: xmlPath,
                async: false,
                dataType: "xml",
                success: function () {
                    alert("in");
                },
                error: function (jqXHR, textStatus, errorThrown) {
                    alert("jqXHR: " + jqXHR.status + " Response text : "+ jqXHR.responseText);
                    alert("Menu XML test status: " + textStatus);
                    alert("Menu XML: " + errorThrown)
                }
            });

   
            
      }

</script>
</head>

<body>

</body>
</html>


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>