Forum

How to use JS callback node

07 June 2016 17:53

I tried this but my setup doesn't accept JsCallback from a miss… so i have to re-click on the same object to recall the function.
Hmm… it is strange, because if after reclicking on the object callback is called, then the second "Switch Select" is working correctly, otherwise the control flow stucks.

Maybe something is wrong with callback itself or you specified wrong callback id?
Blend4Web Team - developer
Twitter
LinkedIn
07 June 2016 19:45
OK.
I am rebuilding my JS callback for the moment and am having a few issues with my CSS calls. As soon as this s good i will try again with a miss.
My callback is the same. It wrks fine with background selected.
If it doesnt work i send you more files.
07 June 2016 21:14
I unpluged the miss and the background object from my switch select and it still works…. I added a console log node on one of the objects and on the miss. The first one works great but the miss never answers. I think i found something Buggy!

i hadn't noticed that in my console
[1:1:0607/201842:ERROR:PlatformKeyboardEvent.cpp(117)] Not implemented reached in static PlatformEvent::Modifiers blink::PlatformKeyboardEvent::getCurrentModifierState()


Wich is triggered when i reexport scenes.
05 November 2016 16:35
Same here, the miss case of Switch Select never calls the js callback!
31 October 2018 19:40
Hi.
I used js callback to adjust the size of a html element in blend4web, which worked fine. I then used a JS function to adjust the size of the same html element to a new size, but it doesn't respond.
Please can someone help me out, don't know if am getting something wrong.
The code is below.
function closeNav() {document.getElementById("myNav").style.width="0px"};
01 November 2018 17:52
Never mind, I was able to get it to work. The html element was not declared in JavaScript. The function was there, but no html event listener to trigger it.
 
Please register or log in to leave a reply.