Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

Highlight values on a TextArea filter (Webplayer 7.0+)

html

<DIV id='highlighter'>Cuba, Mexico and of course, Panama are highlighted in this List Box filter <SpotfireControl id="l157f11734" /></DIV>


javascript
#
$("#highlighter .ListItems").one('DOMSubtreeModified',function(){
$(this).contents().each(function(n,anItem){
$(anItem).css('background-color', 
anItem.innerText=="Australia" 
 || anItem.innerText=="Cuba"
 || anItem.innerText=="Mexico"
 || anItem.innerText=="Panama"
 ? 'yellow':'white'
)
})
})



1 comment:

Unknown said...

Is there any way to change the size of the ListBox using JavaScript? I find when I use the built-in Format options to change width and height, the ListBox does not render/refresh properly in the Text Area. I'm hoping I can leave the size on Auto, but then override the size using JavaScript?