Previous Topic: Javascript Global StatementsNext Topic: Microsoft Office Web Components


Custom iConsole Functions

In the past, some reports have defined their own versions of standard iConsole functions. While supported, we strongly recommended that you adopt the use of standard functions as documented in this guide. For example, running a drilldown query is now only supported by the standard function RunQuery.

If the report used a custom version of RunQuery called rut_RunQuery and set the event UID for the drilldown in an HTML Element called ‘event_uid’ then this is supported automatically. However, we recommend that you update the report to use RunQuery directly.

The logic used in a report’s customized version of this function might have been appropriate with earlier versions of the iConsole, but the changes in iConsole mean that may no longer be the case. Even though the Javascript may function as expected, we recommend that you change the Javascript to call the standard functions.

The iConsole changes cause many objects on the customization and results pages to be rendered differently and to have different properties. This means that custom code written to manipulate these might not work. The standard iConsole functions referred to above, to be used instead of the old custom code, can be made available by including the supplied search-helper.js file.

This is achieved by adding the following to your Javascript:

<script type="text/javascript" src="scripts/search-helper.js"></script>

Some examples (before and after):

Before:

document.getElementById('numIntervention').value = numInter;

After:

SH_SetTextBoxByName('numIntervention', numInter);

Before:

document.getElementById('chkBL').checked = true;

After:

SH_SetCheckboxByName('chkBL', true);

Before:

var	obj = document.getElementById('lstBRE');
	if (obj) obj.disabled = bDisabled;

After:

SH_DisableParameterByName('lstBRE', bDisabled);