Widget:CJP3: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | ||
<script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/md5.js"></script> | |||
<script type"text/javascript"> | <script type"text/javascript"> | ||
$(document).ready(ensureLoggedIn); | $(document).ready(ensureLoggedIn); | ||
Line 31: | Line 32: | ||
ndc = val.printouts["NDC"]; | ndc = val.printouts["NDC"]; | ||
pillName = val.printouts["Pill Name"]; | pillName = val.printouts["Pill Name"]; | ||
//Look up file Directory with MD5: | |||
md5 = CryptoJS.MD5(pillName); | |||
imageDirect = 'http://static.wikidoc.org/' + md5.substr(0,0) + '/' + md5.substr(0,1) + '/' + pillName; | |||
//Find a <table> element with id="resultsTable-body": | //Find a <table> element with id="resultsTable-body": | ||
table = document.getElementById("resultsTable-body"); | table = document.getElementById("resultsTable-body"); | ||
Line 60: | Line 64: | ||
cellPillSocring.innerHTML = pillScoring; | cellPillSocring.innerHTML = pillScoring; | ||
cellNDC.innerHTML = ndc; | cellNDC.innerHTML = ndc; | ||
cellPillName.innerHTML = | cellPillName.innerHTML = imageDirect; | ||
}); | }); | ||
}); | }); |