Reactive web- How to run javascript within web screen

I'm having a hard time finding any useful reactive tutorials or training.    I have a web block with some javascript that I want to use on my screen.  When the screen loads I want to call the web block's function, but I'm not sure how that works in reactive web  In traditional I could do it in the prep or even an expression widget on the screen.   

I'm not seeing this option with Reactive, am I just overlooking something?  Thanks in advance for any tips.

Solution
Processing Upload...

Hi Josh,


as far as tutorials is concerned, there are some, but when in doubt I try to imagine reactive web is like mobile without the cordova plugins and local storage.  So on some subjects where you don't find a reactive tutorial, maybe looking up the same on mobile might help you forward.  So a tutorial about mobile screen lifecycle might be close enough to a reactive screen life cycle.  It is definitely closer that traditional web to reactive web.


So, I'm not sure what it is that you are trying to do exactly, but maybe see attached oml for some inspriration, I just dit an alert in Javascript since I don't know the language.  I used the on ready event of a screen and a webblock, and showed how to use scripts and the reference functions in them from a Javascript node.


Hope this helps,

Dorine


Oh, now I understand your 'call the webblock function'.  I think in the past webblocks were used as the instrument to add scripts to a screen, right?  There's no need for that, you can just add the script to the module, and declare it as required in the screens where you want to call functions from it.

Solution

This helped immensely.   I have not had to work on any mobile applications yet so I haven't done any of that training, but after you mentioned the onReady figured out what I should be doing.  

And yes, in the past we just added scripts as resources for the web blocks and then call those scripts from the screen that is leveraging them.   I'm not sure if this is better or not yet, but it's certainly different!