Hi
@Mashiane's question
It was asked and resolved here. It gives an error in my tests.
jquery 2.1.0 attached to the project
Console Error; Uncaught SyntaxError: expected expression, got '%'
App.js Error;
I'm testing it like @alwaysbusy does in post 2. My codes are as follows. I can use TestFunc () from within Javascript.
console error; Uncaught ReferenceError: _B is not defined
Is there a way to call BANano function from within javascript.
@Mashiane's question
It was asked and resolved here. It gives an error in my tests.
jquery 2.1.0 attached to the project
[BANano]: [SOLVEd] How to CallSub inside #If JavaScriptSmart?
Hi there I'd like to call a b4j function inside a javascript function, here is an example.. #if JavascriptSmart $(document).on('pagebeforeshow', '#headline', function(){ ${BANano.CallSub(Me, "LoadSelectedMovie", Null)} }); #End If Sub LoadSelectedMovie 'clear the listview content...
www.b4x.com
App.js Error;
JavaScript:
function banano_dummies_page1() {var _B;this._ws=null;this.__2={};this.callok=function()
....
...
}
function TestFunc(){
(function() {if (typeof _B[(%"callok"%).toLowerCase()]==="function") {var CSr = _B[(%"callok"%).toLowerCase()](,_B);if(CSr!=null) {return CSr}}})()
//_B.__2
//alert("TEST");
}
[BANano]: [SOLVEd] How to CallSub inside #If JavaScriptSmart?
Hi there I'd like to call a b4j function inside a javascript function, here is an example.. #if JavascriptSmart $(document).on('pagebeforeshow', '#headline', function(){ ${BANano.CallSub(Me, "LoadSelectedMovie", Null)} }); #End If Sub LoadSelectedMovie 'clear the listview content...
www.b4x.com
Code:
Sub Process_Globals
Private BANano As BANano 'ignore
Private ws As BANanoWebSocket
Private MethodLoad As Object
End Sub
Sub CallOk
Log("demo 121212121")
End Sub
'//${MethodLoad}
'//${BANano.CallSub(Me, "CallOk", Null)}
#if JavascriptSmart
function TestFunc(){
${MethodLoad}
//alert("TEST");
}
#End If
public Sub Show
MethodLoad = BANano.CallBack(Me, "CallOk", Null)
....
....
End Sub
console error; Uncaught ReferenceError: _B is not defined
JavaScript:
function banano_dummies_page1() {var _B;this._ws=null;this.__2={};this.CallOk=function()
....
...
}
function TestFunc(){
_B.__2 --> Error
//alert("TEST");
}