Widget:PillIdentifier: Difference between revisions

Jump to navigation Jump to search
Christopher Popma (talk | contribs)
No edit summary
Christopher Popma (talk | contribs)
No edit summary
 
Line 162: Line 162:
var printoutRequests = "|?Pill%20Imprint|?Pill%20Dosage|?Pill%20Ingred|?Pill%20Color|?Pill%20Shape|?Pill%20Size%20(mm)|?Pill%20Scoring|?NDC|?Pill%20Name";
var printoutRequests = "|?Pill%20Imprint|?Pill%20Dosage|?Pill%20Ingred|?Pill%20Color|?Pill%20Shape|?Pill%20Size%20(mm)|?Pill%20Scoring|?NDC|?Pill%20Name";
var jsonURL = "http://www.wikidoc.org/api.php?action=ask&query="+queryParameters+printoutRequests+"&format=json";
var jsonURL = "http://www.wikidoc.org/api.php?action=ask&query="+queryParameters+printoutRequests+"&format=json";
console.log(jsonURL);
 
$.getJSON(jsonURL, function (data) {
$.getJSON(jsonURL, function (data) {
someData=data;
someResults=data.query.results;
console.log(countProperties(data.query.results));
if(countProperties(data.query.results) > 0){
if(countProperties(data.query.results) > 0){
$.each(data.query.results, function(ind, val) {
$.each(data.query.results, function(ind, val) {

Latest revision as of 02:37, 3 August 2015