My website URL is:
http://mgs.epizy.com/dev_prj/index.php
What I’m seeing is:
error message
Access to XMLHttpRequest at ‘htt ps://infinityfree.net/errors/404/’ (redirected from ‘htt p://mgs.epizy.com/phpmysql/data.php?queryType=Select&flds=invoice_year,job_type,account_name,tot_ctc,tot_val&table=vw_tot_invoice_values&_=1584999729266’) from origin ‘htt p://mgs.epizy.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
jqx-all.js:17 GET htt ps://infinityfree.net/errors/404/ net::ERR_FAILED
I’m using this software:
Chrome browser Version 80.0.3987.149 (Official Build) (64-bit)
Additional information:
The error occurs on loading the site main page, which itself uses a javascript file trying to retrieve data from the database (relevant code below):
var url = ‘…/data.php?queryType=’+qryType+‘&flds=’+selectFlds+‘&table=’+tbl;
var invoiceSource = {
datatype: “json”,
datafields: [
{ name: ‘invoice_year’, type: ‘string’},
{ name: ‘job_type’, type: ‘string’},
{ name: ‘account_name’, type: ‘string’},
{ name: ‘tot_ctc’, type: ‘number’},
{ name: ‘tot_val’, type: ‘number’}
],
url: url,
root: ‘data’,
};
If i change the url value to:
http s://mgs.epizy.com/phpmysql/data.php?queryType=‘+qryType+’&flds=‘+selectFlds+’&table='+tbl;
I get the error below:
jqx-all.js:17 GET https://mgs.epizy.com/phpmysql/data.php?queryType=Select&flds=invoice_year,job_type,account_name,tot_ctc,tot_val&table=vw_tot_invoice_values&_=1584999947004 net::ERR_SSL_PROTOCOL_ERROR
The site I am trying to build uses XMLHttpRequest to get data from/to the database. How can I resolve this issue?
Thanks
mm