52
Views
8
Comments
Solved
in Action Flows, in a Screen Action or a Server Action, can't see/use RunJavaScript
Question

After enabling following dependency, in Action Flows, either in a Screen Action or a Server Action, can't use RunJavaScript action of the HTTPRequestHandler extension. What do i miss?

Rank: #119
Solution

Giorgos Sgouridis wrote:

From where exactly i have to drag and drop it, I can't understand it from your screenshot.
I dont see it on the sidebar of my client action afterenabling it on the dependency manager.

Hello Giorgos,

Hope you're doing well.

RunJavaScript is a server action from HTTPRequestHandler extension.

The purpose of this action is to send the defined JavaScript code to run in the context of the browser. This means that the code will run on the client side, not on the server side (although we're talking about a server action).

In order to use it in your flows, you should enable the dependency (like you did), you can just drag and drop it from your Logic tab to your flows or you can drag the Run Server Action widget (from your left panel) and choose RunJavaScript action.


However, let me just say that this RunJavaScript server action applies only to Traditional Web Applications.

From what I can see, you're working on a Mobile or Reactive Web Application.


In Reactive Web and Mobile Applications, you have the JavaScript widget instead (which you are already using it) in order to run your JavaScript code on the client side:


Kind regards,

Rui Barradas

Rank: #609

Hi Giorgos,

After enabling the "RunJavaScript" from manager dependency drag and drop it into the screen action or server action when you want to run your java script, please refer the below attachment.

Hope this will help you.

Regards,

Vipasha

Rank: #26582

I AM ON MOBILE.
From where exactly i have to drag and drop it, I can't understand it from your screenshot.
I dont see it on the toolbox of my client action afterenabling it on the dependency manager.

Rank: #26582

Thanks a lot Rui for the detailed information. Indeed i am on mobile. I used the following snippet to change a button from disabled to enabled. What i am missing as its not applying the change on the button? "document.getElementById('" + HasItemButton.Id + "').disabled = false;"

Rank: #119

Hi again Giorgos,

The syntax seems to be correct.

Are you passing the correct Id of the button?

Kind regards,

Rui Barradas

Rank: #119

You're most welcome Giorgos.

You didn't attach the OML, maybe you missed it.

Send me a private message and I will try to help you with your issue, if you still need help on this matter.


Kind regards,

Rui Barradas