With reference to this thread https://stackoverflow.com/questions/22627392/extjs-fileuplaod-cross-origin-frame
Can anyone tell me how to set the values when server side language is PHP. I need to get JSON data. I am using ExtJS at front end.
COMPLETE SCENARIO:
I have a code to upload a json file to server then get the content of this file as response, but after upload I am getting {success:false,message:"Blocked a frame with origin "http://localhost:1842" from accessing a cross-origin frame."}
.
If there is any better solution to read a json file which is located on client computer it will also be helpful.
Code I am using is:
function(){
var form = this.up('form').getForm();
if(form.isValid()){
form.submit({
params: {
domain: document.domain
},
url: 'http://MY-IP/phpfileupload/file.php',
waitMsg: 'Graph Uploading',
success: function(fp, action) {
},
failure: function(fp, action) {
}
});
} }