Hi,

I have a web application where there's a submit button that is set to On Click Method "Ajax Submit". This button directs to a Screen Action where first we disable the submit button so that the user doesn't click on it again (using Ajax refresh) and proceed with the submission process. However, I observed that the loading spinner that appears at the bottom right of the page doesn't appear always. It does sometimes and doesn't sometimes. 

1. Why does the loading icon doesn't come up always? Is there a fixed time threshold after which the loading icon will come up?

2. Can someone explain how to force the loading icon to appear always? I've tried playing around with the CSS class Feedback_AjaxWait but to no avail?

Thank you.

HI Jaspal,


Is it possible for you to put your OML here so we can see? WIthout your specific example, its hard to really give ideas.

Jaspal Singh wrote:

Hi,

I have a web application where there's a submit button that is set to On Click Method "Ajax Submit". This button directs to a Screen Action where first we disable the submit button so that the user doesn't click on it again (using Ajax refresh) and proceed with the submission process. However, I observed that the loading spinner that appears at the bottom right of the page doesn't appear always. It does sometimes and doesn't sometimes. 

1. Why does the loading icon doesn't come up always? Is there a fixed time threshold after which the loading icon will come up?

2. Can someone explain how to force the loading icon to appear always? I've tried playing around with the CSS class Feedback_AjaxWait but to no avail?

Thank you.

Hi Jaspal,

The ajax loading icon appears based upon the time taken by the ajax request. if the request takes a long time it will stay for a longer time for sure.


Regards,

Pankaj


Solution

Hi Jaspal Singh,

You can force the feedback_ajaxwait.


As you can see in the image. 


At the end of your action you need to end the feedback. 

 

SyntaxEditor Code Snippet

"RichWidgets_Feedback_AjaxWait_End('divWait');"



Cumps



Solution

Stacey Levine wrote:

HI Jaspal,


Is it possible for you to put your OML here so we can see? WIthout your specific example, its hard to really give ideas.

Hi Stacey,

I created a small module that shows this problem. I have attached the OML file. When you open the home page in the browser and click on Submit the loading Icon does not stay on the page till the flow is redirected to another page. Let me know if there are any issues.

Thanks.


Pankaj pant wrote:

Jaspal Singh wrote:

Hi,

I have a web application where there's a submit button that is set to On Click Method "Ajax Submit". This button directs to a Screen Action where first we disable the submit button so that the user doesn't click on it again (using Ajax refresh) and proceed with the submission process. However, I observed that the loading spinner that appears at the bottom right of the page doesn't appear always. It does sometimes and doesn't sometimes. 

1. Why does the loading icon doesn't come up always? Is there a fixed time threshold after which the loading icon will come up?

2. Can someone explain how to force the loading icon to appear always? I've tried playing around with the CSS class Feedback_AjaxWait but to no avail?

Thank you.

Hi Jaspal,

The ajax loading icon appears based upon the time taken by the ajax request. if the request takes a long time it will stay for a longer time for sure.


Regards,

Pankaj


Hi Pankaj,

Thank you for your response. I have attached an OML file above where the request takes around 5 seconds but the Loading Icon does not show up on the screen for me. Kindly have a look if you can.

Thanks.

Pedro Vila Nova wrote:

Hi Jaspal Singh,

You can force the feedback_ajaxwait.


As you can see in the image. 


At the end of your action you need to end the feedback. 

 

SyntaxEditor Code Snippet

"RichWidgets_Feedback_AjaxWait_End('divWait');"



Cumps



Hi Pedro,

Thank you so much for your help. The provided Javascript works and it forces the Loading icon to appear. However, I have two small issues that I am facing with the java script.

1. I cannot stop the loading icon if the ajax refresh stays in the same page (Refer Reset button in attached module)

2. The style of the loading icon is different compared to the loading icon that I should get without using the JS. 

It would be great if you could provide suggestions on how to fix these 2 issues. Again, thank you for your help.

Jaspal Singh wrote:

Pedro Vila Nova wrote:

Hi Jaspal Singh,

You can force the feedback_ajaxwait.


As you can see in the image. 


At the end of your action you need to end the feedback. 

 

SyntaxEditor Code Snippet

"RichWidgets_Feedback_AjaxWait_End('divWait');"



Cumps



Hi Pedro,

Thank you so much for your help. The provided Javascript works and it forces the Loading icon to appear. However, I have two small issues that I am facing with the java script.

1. I cannot stop the loading icon if the ajax refresh stays in the same page (Refer Reset button in attached module)

2. The style of the loading icon is different compared to the loading icon that I should get without using the JS. 

It would be great if you could provide suggestions on how to fix these 2 issues. Again, thank you for your help.


Hi Jaspal,


1 - when you have the action "OnReset" - you need at the end of the action use "runjavascript Action" with "RichWidgets_Feedback_AjaxWait_End('divWait');"



2 -  for example use the component "FullScreenAjaxWait" and drag the webblock for your page.


Regards