Search
ValueChangedEventArgs Constructor
See Also
 






Initializes a new instance of the ValueChangedEventArgs class.

Namespace: MindFusion.Common.UI
File: EventArgs.js

 Syntax

JavaScript  Copy Code

function ValueChangedEventArgs (oldValue, newValue)

 Parameters

oldValue

Object. Gets the value before the change.

newValue

Object. The new value.

 Example

The following code handles the valueChanged event of an ImagePicker:

JavaScript  Copy Code

var u = MindFusion.Common.UI;

var imagePicker = u.ImagePicker(document.getElementById("image_picker"));
imagePicker.valueChanged.addEventListener(handleValueChanged);

function handleValueChanged(sender, args)
{
    //check if an image has been selected and uploaded
    if(args.newValue.toString() != "")
    {
       //do something
    }
}

 See Also