Chapter 7
Unleash the Power of Cognos with Macros, HTML items, and JavaScripts
Section 4
Using JavaScript to Manipulate a Value Prompt
Normal 0 false false false EN-IN X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} This video shows you how we can use JavaScript to make a default selection for the LISTBOX prompt when the page loads. As the listbox values are already sorted in the descending order, we choose the first value to default the report to the latest order date. - Add a LISTBOX prompt to the report to show the order dates in the descending order - Give a name to the LISTBOX prompt - Add a JavaScript to change the selection of LISTBOX to the first item (index 0) when the page loads