Widget:CJP2: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
query : '[[Pill Shape::Oval]]|?Pill Imprint|?Pill Dosage|?Pill Ingred|?Pill Color|?Pill Shape|?Pill Size (mm)|?Pill Scoring|?NDC|?Pill Name', | query : '[[Pill Shape::Oval]]|?Pill Imprint|?Pill Dosage|?Pill Ingred|?Pill Color|?Pill Shape|?Pill Size (mm)|?Pill Scoring|?NDC|?Pill Name', | ||
format : 'json' | format : 'json' | ||
}) | },function(data) {alert("Data: " + data);}); | ||
.always(function (data) { | /*.always(function (data) { | ||
$.each(data.query.results, function (index, value) { | $.each(data.query.results, function (index, value) { | ||
//Assign variables the values returned from the function// | //Assign variables the values returned from the function// | ||
Line 23: | Line 23: | ||
var ndc = value.printouts["NDC"]; | var ndc = value.printouts["NDC"]; | ||
var pillName = value.printouts["Pill Name"]; | var pillName = value.printouts["Pill Name"]; | ||
//Find a <table> element with id="resultsTable-body": | //Find a <table> element with id="resultsTable-body": | ||
var table = document.getElementById("resultsTable-body"); | var table = document.getElementById("resultsTable-body"); | ||
Line 53: | Line 53: | ||
cellNDC.innerHTML = ndc; | cellNDC.innerHTML = ndc; | ||
cellPillName.innerHTML = pillName; | cellPillName.innerHTML = pillName; | ||
Line 61: | Line 61: | ||
//Append the new row with the information.// | //Append the new row with the information.// | ||
$('#resultsTable-body').innerHTML(newRow); | $('#resultsTable-body').innerHTML(newRow); | ||
}); | }); | ||
}); | });*/ | ||
}); | }); | ||
}); | }); |