Search
ValueChangingEventArgs.oldValue Property
See Also
 






Gets the value before the change.

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

 Syntax

JavaScript  Copy Code

get oldValue() {}

 Property Value

Object. The value before the change.

 Example

The following code handles the valueChanging event of an ImagePicker:

JavaScript  Copy Code

var u = MindFusion.Common.UI;

var imagePicker = u.ImagePicker(document.getElementById("image_picker"));
imagePicker.valueChanging.addEventListener(handleValueChanging);

function handleValueChanging(sender, args)
{
    //check the old image
    if(args.oldValue.url != "my-folder/myImage.png")
    {
       args.cancel = true;
    }
}

 See Also