Javascript & Run Dialogs

Examples of Javascript used to customize the behaviour and look of Cloudbridge dialogs.

Use this to hide and show controls based on the value of another control. Change a control's text colour, enforce validation or practically anything else you can imagine.


Controls on the form are referenced by their parameter name. Access this feature by clicking the script button beside any parameter in the parameters tab.

For example: A variable $FullName will be referenced in Javascript as #FullName


// Get Control's reference.
var ctrl = $('#FullName');


//Get Control's current text
var result = ctrl.val();


// Change text to upper case
ctrl.val(result.toUpperCase())


// Disable Control
ctrl.attr('disabled','disabled');


// Split text by space and fill other controls
var arrayOfValuesSeparatedBySpace = result.split(' ');
if(arrayOfValuesSeparatedBySpace.length == 2)
{
$('#Fname').val(arrayOfValuesSeparatedBySpace[0]);
$('#Lname').val(arrayOfValuesSeparatedBySpace[1]);
}