I've been getting encountering issues working with samples for version 3.0. First of all, I've just started working with the API recently, so am not sure what needs to be changed with the move to Dojo 1.7 in v3.0. Using this sample as an example, after copying the code and saving it locally, I can view it in IE9, but neither Chrome or Firefox allow it. Chrome gives an error "Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers", while Firefox spits out an error message of "Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://servicesbeta.esri.com/jsapi/arcgis/?v=3.0 :: <TOP_LEVEL> :: line 15" data: no]"
However, when designating the URL of the API in the head of my HTML, if instead of this:
It then loads okay in all browsers, but still gives the errors, and intermittently does not work. The result being, I'm quite confused.
I'm currently without an instance of Server, so hosting the API locally isn't an option at this point. Any advice as to what's happening, where I've gone wrong, etc. would be greatly appreciated. Here's the HTML I've been referencing. Hopefully I'm just making a bonehead mistake!