how to send parameters in d3.json to php

2

Good is there any way to send parameters in d3 to make a request to php.

I have a search form that will send data to php in the form of post wanted me and return the result in json

d3.json("../querys/querys.php", function(error, graph) { 
    
asked by anonymous 19.05.2016 / 00:53

1 answer

1

The D3 documentation refers to only two arguments passed to the function:

d3.json(url[, callback])

This means that you have to send the data in a query string concatenated with the url, and the server has to interpret this.

var data = '?nome=joao&idade=45';
d3.json("../querys/querys.php" + data, function(error, graph) { 
    
19.05.2016 / 00:57