Hello,
calling a JS-Function from a B4J-Websocket-Server, that is in the window-scope (with ws.RunFunction("myTest", Args)) works like a charm:
but i don't know how to call a JS-Function, that is not in the window-scope:
because b4j_runFunction() wants to apply a function in the window-scope:
Any ideas how to solve it?
Thanks in advance & Greetings ... Kiffi
calling a JS-Function from a B4J-Websocket-Server, that is in the window-scope (with ws.RunFunction("myTest", Args)) works like a charm:
B4X:
$(function () {
$(document).ready(function () {
[...]
});
});
function myTest() {
// no problem here
};
but i don't know how to call a JS-Function, that is not in the window-scope:
B4X:
$(function () {
$(document).ready(function () {
[...]
function myTest() {
// i don't know how to call this function
// i get 'undefined is not a function'
};
});
});
because b4j_runFunction() wants to apply a function in the window-scope:
B4X:
function b4j_runFunction(func, params) {
return window[func].apply(null, params);
}
Any ideas how to solve it?
Thanks in advance & Greetings ... Kiffi