COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: basha971 on 20 Aug 2013 01:17:26 AM

Title: Deletion of DeselectAll option from Multiselect Treeprompt
Post by: basha971 on 20 Aug 2013 01:17:26 AM
Hi ,
we have requirement to delete DeselectAll option from multiselect treeprompt by using Java Script.Can any one aware of this please help me on the same.

Title: Re: Deletion of DeselectAll option from Multiselect Treeprompt
Post by: adik on 22 Aug 2013 09:14:11 AM
place a html item from the toolbox at the end on your promp page and paste this in it:


<script>
var deselectLinks = document.getElementsByTagName("a");
for (var i=0; i<deselectLinks.length; i++) {
link = deselectLinks[i];
if (link.className === "clsLink pl" && link.text === "Deselect all") {
link.style.display = "none";
}
}
</script>


This will not work on IE8 and below, not sure about IE9, but IE10 should be fine
Firefox is no problem as that is a "smart" browser and can handle CSS as it should.