javascript - d3.json PHP XMLHttpRequest cannot load -


i have php script working generate json data .htm file implementing force directed graph. local via xampp.

the php script needs argument know data via query. when hard-code value of argument script, works fine call .htm php scipt, i.e.

d3.json("getneighborhood.php", function(error, graph) {   if (error) throw error; 

but if try pass argument via get, i.e.

d3.json("getneighborhood.php?contact=5244", function(error, graph) {   if (error) throw error; 

the console shows

d3.v4.min.js:7 xmlhttprequest cannot load file:///c:/xampp/htdocs/mail/bostock/getneighborhood.php?contact=5244. cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https. 

i gather has loading file, i'm little puzzled why adding argument screws things up. there way fix?


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -