I am trying to POST data using my sub domain using dojo, but dojo returns me this error.
XMLHttpRequest cannot load http://uri.com/ Origin http://sub.uri.com/ is not allowed by Access-Control-Allow-Origin.
var form= dojo.byId("form");
dojo.connect(formSignIn, "onsubmit", function(event){
event.preventDefault();
var xhrArgs = {
form: form,
handleAs: "text",
load: function(data){
//dojo.byId("response").innerHTML = "Form posted.";
},
error: function(error){
//dojo.byId("response").innerHTML = "Form posted.";
}
}
var deferred = dojo.xhrPost(xhrArgs);
console.log(deferred);
});
this is my code. is there any available options in dojo.xhrPost that can enable me to access my main website so i can process my POST?