Hi everyone,
When I try to use the change event to bindTo a function, I get the following error : "Uncaught TypeError: Cannot read property 'changeMethod' of undefined".
In my diff schema, the change event has a bound function:
{
"operation": "insert",
"name": "Product",
"values": {
"layout": {
"colSpan": 12,
"rowSpan": 1,
"column": 0,
"row": 1,
"layoutName": "MyLayout"
},
"bindTo": "MyLookup",
"contentType": Terrasoft.ContentType.LOOKUP,
"enabled": true,
"change": {
bindTo: "setProduct"
},
"contentType": 3
},
"parentName": "MyLayout",
"propertyName": "items",
"index": 1
}
And I call it's method handler with the following.
setProduct: function() {
console.log("Success!");
}
Adding the "change": { bindTo: "setProduct" } causes the page to not load. Is there a way to activate a JavaScript function when a select element on a page is changed? I need to change the values in a corresponding select element based on the value of the preceding select element.