Please note the following code:
$.ajax({
type: "POST",
url: loginURL,
data: jsonArray,
async: true,
success: function(data, status){
alert(status);
},
error: function(data, status){
alert(status + " 1");
}
});
The error case is thrown every time, but I have fiddler open and I'm receiving data from the server just fine. I'm attaching a panel to a widget. In the HTML that gets loaded in the panel, I'm including the latest jquery and a login javascript file.
Actually you can make cross domain request in content script of Firefox extension. check this link:
https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Content_Scripts/Cross_Domain_Content_Scripts
you need to clarify the domain permission in package.json like this:
"permissions": {
"cross-domain-content": ["http://datapoint.metoffice.gov.uk"]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With