jQuery as of version 1.2 has a new dataType setting that works around this problem. It can only be used with the .ajax function, not .get or .post.
Example syntax
$.ajax({ type: 'GET', url: stats_counter_url, data: { 'action':'impression', 'venueid':venueid, 'pn':pn, 'filter':filter, 'ads':ads}, dataType: 'json', jsonp:'jsonp_callback', success: function(data) { alert(data); }, });
Access to restricted URI denied" code: "1012
Hi TOM
I have created a WCF which is taking and giving reponse in JSON format.Then I made another web appliaction which will consume it.When i run it on firefox it is giving me error
Access to restricted URI denied" code: "1012
xhr.open(type, s.url, s.async);
But it is working fine in IE.I read in some forums about cross domain issue in Firefox and localhost access security in firefox so I deployed my service to my web server.But still no gain and the same error.
I tried even you solution but no luck.Is I am missing anything else
Here is what i did
function GetData() {
alert("step1");
$.ajax({
url: 'http://localhost:1899/VirtualService/Exhibithall.svc/GetAllPawans',
type: 'GET',
success: function(response) {
var objData = null;
objData = eval('(' + response + ')');
alert(response);
$('#txtName').val(objData[1].CountryI);
$('#txtDes').val(objData[1].CountryN);
document.getElementById("lbl3").innerText = objData[2].CountryI;
document.getElementById("lbl4").innerText = objData[2].CountryN;
},
failure: function(response) {
}
});
alert("step2");
}
please help.
pawan
fix
place a new js file with filename "browser-prefs.js" with content as
pref("signed.applets.codebase_principal_support", true);
in the folder C:\Program Files\Mozilla Firefox\defaults\pref
this will fix your problem i guess.