Monday, 25 November 2013

To select options in cognos search prompt

Name your search prompt.
Example=RClient

Create 2 HTML items

In 1st html paste this javascript

<div id="RClient">

In 2nd HTML paste this js


</div>
<script>
/* Select and search options
 * 2 - Starts with any of these keywords * DEFAULT
 * 3 - Starts with the first keyword and contains all of the remaining keywords
 * 4 - Contains any of these keywords
 * 5 - Contains all of these keywords
 */
document.getElementById('RClient').getElementsByTagName('input')[3].click();
</script>

In my case it will select the  3 - Starts with the first keyword and contains all of the remaining keywords.
You can change it based on your requirement.

No comments:

Post a Comment