Widget:CJP: Difference between revisions

Jump to navigation Jump to search
Christopher Popma (talk | contribs)
No edit summary
Christopher Popma (talk | contribs)
No edit summary
Line 2: Line 2:
<script type = "text/javascript">
<script type = "text/javascript">
$(document).ready(function() {
$(document).ready(function() {
    $('#pillTable').css('visibility','hidden');
     $('#executeGo').click(function() {
     $('#executeGo').click(function() {
         $('#textHere').append('<p>{|class="wikitable sortable" cellpadding="5"</p><p>!Drug Name !! Pill Imprint !! Dosage !! Ingredients !! Pill Color !! Pill Shape !! Pill Size (mm) !! Score !! NDC !! Pill Image</p><p>|-</p><p>{{#ask:</p>');
         $('#searchParameters').append('<string>[[Pill Shape::</string>'+$('#selectPillShape option:selected').val() +'<string>]]</string>');
        $('#textHere').append('<string>[[Pill Shape::</string>');
         $('#pillTable').css('visibility','visible');
         $('#textHere').append($('#selectPillShape option:selected').val());
        $('#textHere').append('<string>]] |?Pill Imprint|?Pill Dosage|?Pill Ingred|?Pill Color|?Pill Shape|?Pill Size (mm)|?Pill Scoring |?NDC|?Pill Name|format=template|template=PillID}}</string><p>|}</p>');
     });
     });
     $('#executeReset').click(function() {
     $('#executeReset').click(function() {
         $('#textHere').empty();
         $('#searchParameters').empty();
        $('#pillTable').css('visibility','hidden');
     });
     });
});
});
</script>
</script>
Pill Shape: <select id="selectPillShape">
<option>Round</option>
<option>Oval</option>
<option>Capsule</option>
</select><br />
<div id="textHere"></div>
<input type="button" id="executeGo" value="Go" />
<input type="button" id="executeGo" value="Go" />
<input type="button" id="executeReset" value="Reset" />
<input type="button" id="executeReset" value="Reset" />
<div id="pillTable" style="width:500px;">
    {|class="wikitable sortable" cellpadding="5"
    !Drug Name !! Pill Imprint !! Dosage !! Ingredients !! Pill Color !! Pill Shape !! Pill Size (mm) !! Score !! NDC !! Pill Image<br/>
    |- <br/>
    {{#ask:<string id="searchParameters"></string><br/>
    |?Pill Imprint<br/>
    |?Pill Dosage<br/>
    |?Pill Ingred<br/>
    |?Pill Color<br/>
    |?Pill Shape<br/>
    |?Pill Size (mm)<br/>
    |?Pill Scoring<br/>
    |?NDC<br/>
    |?Pill Name<br/>
    |format=template<br/>
    |template=PillID}}<br/>
    |}
</div>
</includeonly>
</includeonly>

Revision as of 17:31, 28 May 2014