Error using $.ajax type GET on IE

BrepBlemsoype

New Member
I can't run this script on IE, and I know why, because on debugger 'F12' I can see nothing, on other browsers it works (FF, CH and Safari). This script gets a token from facebook and after will save to the database (the function that saves to the database is \[code\]end()\[/code\]).\[code\]function NewPage2() { var url2 = "https://graph.facebook.com/oauth/access_token?client_id=" + '<%=ConfigurationManager.AppSettings["clientId"].ToString() %>' + "&redirect_uri=" + '<%=ConfigurationManager.AppSettings["redirectUrl"].ToString() %>' + "&state=" + document.getElementById('text').value + "&client_secret=" + '<%=ConfigurationManager.AppSettings["client_secret"].ToString() %>' + "&code=" + getUrlVars2()["code"]; $.ajax({ url: url2, type: 'GET', success: function (res) { alert("success" + res); }, error: function (res) { alert("Error" + res); } }); }function getUrlVars2() { var vars = [], hash; var url = location.href.replace("#_=_", ""); var hashes = url.slice(url.indexOf('?') + 1).split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes.split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; }\[/code\]
 
Top