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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -