Widget:CJP4: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
var queryIngred = ""; | var queryIngred = ""; | ||
if (document.getElementById('selectedShape').value) | |||
if ( | |||
{ | { | ||
var queryShape = '[[Pill%20Shape::' + | var queryShape = '[[Pill%20Shape::' + document.getElementById('selectedShape').value + ']]'; | ||
} | } | ||
if ( | if (document.getElementById('selectedColor').value) | ||
{ | { | ||
var queryColor = '[[Pill%20Color::' + | var queryColor = '[[Pill%20Color::' + document.getElementById('selectedColor').value + ']]' | ||
} | } | ||
if ( | if (document.getElementById('selectedScoring').value) | ||
{ | { | ||
var queryScoring = '[[Pill%20Scoring::' + | var queryScoring = '[[Pill%20Scoring::' + document.getElementById('selectedScoring').value + ']]' | ||
} | } | ||
if ( | if (document.getElementById('selectedImprint').value) | ||
{ | { | ||
var queryImprint = '[[Pill%20Imprint::' + | var queryImprint = '[[Pill%20Imprint::' + document.getElementById('selectedImprint').value + ']]' | ||
} | } | ||
if ( | if (document.getElementById('selectedMinSize').value) | ||
{ | { | ||
var queryMinSize = '[[Pill%20Size%20(mm)::>' + | var queryMinSize = '[[Pill%20Size%20(mm)::>' + document.getElementById('selectedMinSize').value + ']]' | ||
} | } | ||
if ( | if (document.getElementById('selectedMaxSize').value) | ||
{ | { | ||
var queryMaxSize = '[[Pill%20Size%20(mm)::<' + | var queryMaxSize = '[[Pill%20Size%20(mm)::<' + document.getElementById('selectedMaxSize').value + ']]' | ||
} | } | ||
if ( | if (document.getElementById('selectedNDC').value) | ||
{ | { | ||
var queryNDC = '[[NDC::' + | var queryNDC = '[[NDC::' + document.getElementById('selectedNDC').value + ']]' | ||
} | } | ||
if ( | if (document.getElementById('selectedIngred').value) | ||
{ | { | ||
var selectedIngredArray = | 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() + ']]'; |