Widget:CJP4: Difference between revisions

Jump to navigation Jump to search
Christopher Popma (talk | contribs)
No edit summary
Christopher Popma (talk | contribs)
No edit summary
Line 19: Line 19:
var queryIngred = "";
var queryIngred = "";
 
if (document.getElementById('selectedShape').value)
        alert($('#selectedShape'));
if ($('#selectedShape').value)
{
{
var  queryShape = '[[Pill%20Shape::' + $('#selectedShape').value + ']]';
var  queryShape = '[[Pill%20Shape::' + document.getElementById('selectedShape').value + ']]';
}
}
if ($('#selectedColor').value)
if (document.getElementById('selectedColor').value)
{
{
var queryColor = '[[Pill%20Color::' + $('#selectedColor').value + ']]'
var queryColor = '[[Pill%20Color::' + document.getElementById('selectedColor').value + ']]'
}
}
if ($('#selectedScoring').value)
if (document.getElementById('selectedScoring').value)
{
{
var queryScoring = '[[Pill%20Scoring::' + $('#selectedScoring').value + ']]'
var queryScoring = '[[Pill%20Scoring::' + document.getElementById('selectedScoring').value + ']]'
}
}
if ($('#selectedImprint').value)
if (document.getElementById('selectedImprint').value)
{
{
var queryImprint = '[[Pill%20Imprint::' + $('#selectedImprint').value + ']]'
var queryImprint = '[[Pill%20Imprint::' + document.getElementById('selectedImprint').value + ']]'
}
}
if ($('#selectedMinSize').value)
if (document.getElementById('selectedMinSize').value)
{
{
var queryMinSize = '[[Pill%20Size%20(mm)::>' + $('#selectedMinSize').value + ']]'
var queryMinSize = '[[Pill%20Size%20(mm)::>' + document.getElementById('selectedMinSize').value + ']]'
}
}
if ($('#selectedMaxSize').value)
if (document.getElementById('selectedMaxSize').value)
{
{
var queryMaxSize = '[[Pill%20Size%20(mm)::<' + $('#selectedMaxSize').value + ']]'
var queryMaxSize = '[[Pill%20Size%20(mm)::<' + document.getElementById('selectedMaxSize').value + ']]'
}
}
if ($('#selectedNDC').value)
if (document.getElementById('selectedNDC').value)
{
{
var queryNDC = '[[NDC::' + $('#selectedNDC').value + ']]'
var queryNDC = '[[NDC::' + document.getElementById('selectedNDC').value + ']]'
}
}
if ($('#selectedIngred').value)
if (document.getElementById('selectedIngred').value)
{
{
var selectedIngredArray = $('#selectedIngred').value.split(',');
var selectedIngredArray = document.getElementById('selectedIngred').value.split(',');
                 $.each(selectedIngredArray, function(index, value){
                 $.each(selectedIngredArray, function(index, value){
                     selectedIngredArray[index] = '[[Pill%20Ingred::' + value.trim() + ']]';
                     selectedIngredArray[index] = '[[Pill%20Ingred::' + value.trim() + ']]';

Revision as of 14:14, 12 June 2014