Widget:CJP3: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
ndc = val.printouts["NDC"]; | ndc = val.printouts["NDC"]; | ||
pillName = val.printouts["Pill Name"]; | pillName = val.printouts["Pill Name"]; | ||
//Find a <table> element with id="resultsTable-body": | |||
table = document.getElementById("resultsTable-body"); | |||
//Create an empty <tr> element and add it to the 1st position of the table: | |||
row = table.insertRow(index); | |||
//Insert new cells(<td> elements) into the "new" <tr> element: | |||
cellDrugName = row.insertCell(0); | |||
cellPillImprint = row.insertCell(1); | |||
cellPillDosage = row.insertCell(2); | |||
cellPillIngred = row.insertCell(3); | |||
cellPillColor = row.insertCell(4); | |||
cellPillShape = row.insertCell(5); | |||
cellPillSize = row.insertCell(6); | |||
cellPillSocring = row.insertCell(7); | |||
cellNDC = row.insertCell(8); | |||
cellPillName = row.insertCell(9); | |||
//Add Values to the cells: | |||
cellDrugName.innerHTML = drugNameShort ; | |||
cellPillImprint.innerHTML = pillImprint; | |||
cellPillDosage.innerHTML = pillDosage; | |||
cellPillIngred.innerHTML = pillIngred; | |||
cellPillColor.innerHTML = pillColor; | |||
cellPillShape.innerHTML = pillShape; | |||
cellPillSize.innerHTML = pillSize; | |||
cellPillSocring.innerHTML = pillScoring; | |||
cellNDC.innerHTML = ndc; | |||
cellPillName.innerHTML = pillName; | |||
alert(drugNameFull + '\n' + drugNameShort + '\n' + pillImprint + '\n' + pillDosage + '\n' + pillIngred + '\n' + pillColor + '\n' + pillShape + '\n' + pillSize + '\n' + pillScoring + '\n' + ndc + '\n' + pillName); | alert(drugNameFull + '\n' + drugNameShort + '\n' + pillImprint + '\n' + pillDosage + '\n' + pillIngred + '\n' + pillColor + '\n' + pillShape + '\n' + pillSize + '\n' + pillScoring + '\n' + ndc + '\n' + pillName); | ||
}); | }); |