How would I call a function from within B4W?
30 December 2015 21:57
Is there a logic node call or some other method within B4W that I could use to trigger any <script> function? I would like to pass some vars to Storyline, so that I can get B4W to talk to an LMS. The send request node won't work for Storyline. It requires what is posted below.
I can sort of get it to work by using the page redirect node, but it kills the b4W scene. Any thoughts?
<script>
function lol(){
parent.setVariable("bob",false)
}
</script>
I can sort of get it to work by using the page redirect node, but it kills the b4W scene. Any thoughts?
<script>
function lol(){
parent.setVariable("bob",false)
}
</script>
05 January 2016 13:08
Hi and welcome to our forums!
Sorry for such long delays (we're celebrating the New Year till 11 January ). I cannot understand what you are trying to do: make some RPC request to another server or execute some function within current execution environment? In both cases you need to write some code, in the first one, make xmlhttprequest to the remote server in the second, just execute the function.
Sorry for such long delays (we're celebrating the New Year till 11 January ). I cannot understand what you are trying to do: make some RPC request to another server or execute some function within current execution environment? In both cases you need to write some code, in the first one, make xmlhttprequest to the remote server in the second, just execute the function.
Blend4Web Team
https://twitter.com/AlexKowel
https://twitter.com/AlexKowel
07 January 2016 01:35
Thanks, you answered my question. From your response, I executed a function within example.js in the https://www.blend4web.com/en/article/23/ tutorial , and got it to pass some variables.