Widget:CJP3: Difference between revisions

Jump to navigation Jump to search
Christopher Popma (talk | contribs)
No edit summary
Christopher Popma (talk | contribs)
No edit summary
Line 21: Line 21:
alert('Success!');
alert('Success!');
                                         alert('Data return: ' + data.query.results);
                                         alert('Data return: ' + data.query.results);
                                         alert($.getOwnPropertyNames(data.query));
                                         var keys = Object.keys(data);
                                        alert('Keys: ' + keys);
$.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//
var drugNameFull = value.fulltext;
var drugNameFull = 'fullname #/*value.fulltext;*/
var drugNameShort = drugNameLong.split("#")[0];
var drugNameShort = /*drugNameLong.split("#")[0];*/
var pillImprint = value.printouts["Pill Imprint"];
var pillImprint = value.printouts["Pill Imprint"];
var pillDosage = value.printouts["Pill Dosage"];
var pillDosage = value.printouts["Pill Dosage"];

Revision as of 19:16, 3 June 2014