Hi I am using the following code to display the grid in Chrome,However i can only see the headers but no data is displayed
I ahve attached the errors ,PFB the code
----------------- The XML Code------------
<?xml version="1.0" encoding="UTF-8"?>
Please, try to load your page from the web server:
Path “file:///D:/chromeTesting/chromeTesting/index.html” is incorrect.
but something like: “localhost/chromeTesting/index.html” will be correct
I have exactly the same issue as the OP.
My ‘stuff’ works perfectly on FF, IE, Safari on both Winders and Mac - BUT…
Fails on Chrome on both Winders and Mac.
Chrome Console reports:
Uncaught ReferenceError: doInitGrid is not defined Statements_list.html:50
XMLHttpRequest cannot load
file:///C:/Documents%20and%20Settings/NK/My%20Documents/HTML%20Presentation/Data/exhibits/source_xml/dataexported_statements.xml. Received an invalid response. Origin ‘null’ is therefore not allowed access. Statements_list.html:
My coding is very similar to the OP so I haven’t posted it - but can do if it helps.
I am not sure how the response to the OP actually solves the issue, I am using the grid to present data to users with a web front end, the data is hosted either on the local machine, or most probably on a thumb drive.
I can live with this, by telling my users not to use Chrome, but I am annoyed I can’t fix it…
Any help gratefully received - thanks,
Ok - so I am going to answer my own question.
Unless anyone knows differently…
Because of the ‘security’ features in the latest versions of Chrome it won’t allow access to data stored on the local host - Access-Control-Allow-Origin won’t allow it.
I have tried to follow a whole heap of helpful hints, but mainly because I am not running server client, nothing I do seems to convince Chrome to properly render the grid.
I will just have to tell my users not to use Chrome.
Are you certain that the web server is sending the correct headers for the xml file?
The header should be: ‘Content-Type: text/xml’
I’ve had simular problems when serving xml data with a html headers.
Here’s a link showing the header for each file type: davidwalsh.name/php-header-mime