Hi,
I want to build a Javascript App (with the Generic Javascript View Node) which has a button. Clicking on the button executes a locally defined function (It doesn’t matter what the function does):
Here is a simple Example:
var body = document.getElementsByTagName('body')[0];
body.innerHTML = `
<script>function knimeTest() {
alert("Hello");
}
</script>
<button onclick="knimeTest()">Test</button>
`;
JS_function.knwf (5.6 KB)
When trying to execute the Generic Javascript Node, I am seeing the button, but when clicking on it, I get the error, that the function is not defined ERROR CEFWizardNodeView Uncaught ReferenceError: knimeTest is not defined
.
Can someone help me to figure out, how to declare a simple function and use it inside the Generic Javascript View Node?