View Full Version : Theming Ext JS - receiving "Cross origin requests..."

29 May 2014, 5:47 AM
I am going through the Theming Ext JS tutorial from the Ext JS 4.2.1 Sencha Docs and I have run into this error:

XMLHttpRequest cannot load file:///C:/Java-Inf/Sencha/Cmd/ Cross origin requests are only supported for HTTP

Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///C:/Java-Inf/Sencha/Cmd/'.

This occurred after I implemented the code in section "Creating Custom Component UIs". I receive the error in FF, Chrome and IE. I am not sure how to resolve this. I was not sure whether to post this in the Sencha Cmd forum or the Ext JS 4 forum. I have seen this error before while going through some of the example apps.

I know the error is due to running the file - index.html and to resolve this it should be run through a web server. How do you go about this when running the sample apps or in this case the tutorial for Theming? Is there a setting in FF/IE/Chrome to allow it?

Appreciate any help.

2 Jun 2014, 5:50 AM
This is because you are loading it off the filesystem. You should use a web server.