Sorry , i am new to this so , not sure if i understand you correctly when you say insert weblock call script JS , do you mean the client action ?

I created 4 inputkey, the first 2 is enabled for user to input their value. The other 2 is disabled as it is for the application to display the value. I tie this inputkey to the local variable accordingly
I added a button and tie the button to the client action EncryptOnClick

When i click on the Encrypt button it just run the EncryptOnClick

The had also added the necessary plugin CryptoJS

What i do not have compare to your screen is the DataAction1 and DataAction2