79
Views
3
Comments
Solved
JavaScript and Ajax Refresh

Hi everyone!


I have two buttons. First button has Ajax Submit Method and in its Action Flow it Refreshes the second Button.

Second Button when clicked has a script in its onclick Extended Properties, the script calls a function with dynamically changed parameters (that is the reason I refreshed this button in Action Flow of A firtst button. 


When you click first and then second button myself everything works.

I want to hide the second button and click it programmatically. The problem here is - if I put a script in onclick extended properties of a first button, it is done before its action flow where there is a refsresh. It means the second button gets clicked without being refreshed.


So onclick in extended properties scripts run first.

My question is how can I change it? Is it possible to programmatically do ajax refresh in a script, not in the action flow? This way, I would be able first refresh and then click.


Thank you in advance

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Valentyna,

There's the RichWidgets Widget_Click action that does exactly that.

So Ajax Refresh, then Widget_Click the second button.

2022-05-29 13-15-09
Valentyna Boiko

Kilian, I am very grateful to you! Finally, everything works as I wanted.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Glad I could be of help :). Happy coding!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.