Displaying and Entering Values in Text Boxes

You use Interactive Reporting Studio text boxes to display output to and gather input from the application.

Ways in which, in Run mode, you can use text boxes:

Text boxes are associated with three events: OnEnter, OnChange, and OnExit.

Example—For OnEnter, attach a JavaScript script

/* OnEnter Event—enables CommandButton */
var sect_name=’Dashboard’;
var ctrl_name=’CommandButton1’;
ActiveDocument.Sections[sect_name].Shapes[ctrl_name].Enabled = true;

Example—For OnChange, attach a JavaScript script

/* OnChange Event- validates changes*/
var sect_name=’Dashboard’;
var ctrl_name=’TextBox1’;
if (ActiveDocument.Sections[sect_name].Shapes[ctrl_name].Text==’Hello’)
{
Alert(‘Hello is an Invalid Entry’);
}

Example—For OnExit, attach a Javascript script

/* OnExit Event- increments variable counter */
var sect_name=’Dashboard’;
var ctrl_name=’TextBox1’;
if (ActiveDocument.Sections[sect_name].Shapes[ctrl_name].Text==’2’)
{
x=x+1;
}