Widget:CJP2: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
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' | ||
} | }.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 56: | Line 55: | ||
//Create a variable containing the HTML to be appended to the end of the table// | //Create a variable containing the HTML to be appended to the end of the table// | ||
//var newRow = '<tr> <td>' + drugNameShort + '</td> <td>' + pillImprint + '</td> <td>' + pillDosage + '</td> <td>' + pillIngred + '</td> <td>' + pillColor + '</td> <td>' + pillShape + '</td> <td>' + pillSize + '</td> <td>' + ndc + '</td> <td>' + pillName + '</td> </tr>'; | //var newRow = '<tr> <td>' + drugNameShort + '</td> <td>' + pillImprint + '</td> <td>' + pillDosage + '</td> <td>' + pillIngred + '</td> <td>' + pillColor + '</td> <td>' + pillShape + '</td> <td>' + pillSize + '</td> <td>' + ndc + '</td> <td>' + pillName + '</td> </tr>'; | ||
/ | //Append the new row with the information.// | ||
$('#resultsTable-body').append(newRow);// | //$('#resultsTable-body').append(newRow);// | ||
}); | } | ||
); | |||
}); | }); | ||
); | ); |