Hello
I try to load a button with the following json (not directly declard but loaded via webix.ui(webix.DataDriver.json.toObject(xmlhttp.responseText), $$(rootPane))
{"view":"button",
"value":"button",
"align":"left",
"type":"standard",
"id":"BUTTON_f4139d7c-d15e-4147-9067-fcd14663d122",
"label":"Click Me",
"click":"function(id,event) { alert(\"Button Click\"+id) }"
}
Whatever i load here either
"click":"alert(\"Button Click\"+id)"
or the above, I always get
VM919:1 Uncaught SyntaxError: Unexpected token (
at eval (<anonymous>)
at toFunctor (webix.js?v=6.3.1:360)
at Object.<anonymous> (webix.js?v=6.3.1:2214)
at Object.callEvent (webix.js?v=6.3.1:483)
at callEvent (webix.js?v=6.3.1:545)
at HTMLBodyElement.<anonymous> (webix.js?v=6.3.1:4010)
When I click the button.
Has somebody a hint how to correctly declare a such a function in json which then is correctly loaded and eval’ed by webix? I would need the id and the generated event as parameter in the function.
Thanks