Very good, I have a code that the data of a form sends in a JSON by means of ajax with the post method to an external server, the external server is already doing what it has to do and it returns me to my other JSON
The problem is that this appears to me:
The strange thing is that who should send it, says that it works perfectly and if you return the JSON that would have to return, but not me.
Would anyone know what happens?
EDIT:
function sendForm(){
var fpU = ROT47(document.forms[0].elements[0].value);
var fpP = ROT47(document.forms[0].elements[1].value);
var sendJSON = {
action: "login",
fpU: "~C5B'/xs",
fpP: "~C5B'Uú!a",
browserInfo: {
appCodeName: navigator.appCodeName,
appName: navigator.appName,
appVersion: navigator.appVersion,
cookieEnabled: navigator.cookieEnabled,
language: navigator.language,
platform: navigator.platform,
userAgent: navigator.userAgent
},
datasite: {
"@accountID": "2",
"@siteID": "3"
}
};
var objJSON = new Object();
objJSON.sendJSON = JSON.stringify(sendJSON);
$.ajax({
url: 'http://evstest.com/G3v1LastVersion/portal/portal_action.php',
data: objJSON,
method: 'post',
async: false,
cache: false,
dataType: 'json',
crossDomain: true,
success: function(response){
console.log(response);
},
error: function(error){
console.log(error);
}
});
}