Controlling JavaScript file execution

In Chapter 3, Using JavaScript Files – Tips and Tricks, we saw many recipes to manipulate the prompts. However, it is to be noted that JavaScript files are executed every time the page loads. Hence, it is important to control the execution of certain scripts.

This recipe will show you why controlling the JavaScript file execution is necessary in certain cases and how to do it.

Getting ready

We will use the report created in the Defining dynamic default values for prompts recipe of Chapter 3, Using JavaScript File – Tips and Tricks for this one.

How to do it...

In this recipe we will have a look at how we can control the JavaScript execution by doing a simple modification to the original script. To do this, perform ...

Get IBM Cognos 10 Report Studio Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.