The following script, when added to the RIGHT_ITEM_TEXT of the CRF Excel template, will insert a button to the right of the field:
<img id=”calculate1″ src=”images/Calculate.gif”>
<script src=”includes/jmesa/jquery-1.3.2.min.js”></script>
<script lang=”Javascript”>
$.noConflict();
</script>
The button has the ID “calculate1” which is referenced in the first calculation script above:$(“#calculate1”).click(function(){calcBMI(); });
Notice that the source of the image is images/Calculated.gif. This refers to the standard images folder of the OpenClinica interface. This example uses a custom image. To use a custom image, drop the file in the /oc/tomcat/webapps/OpenClinica/images folder. Alternatively, the OpenClinica images below already exist in the images folder: