Getting exception while try to do a ajax call

Problem is while trying to select the branch and click on "Ok" button internally we are calling a server action using "Ajax Submit" and based on response we are clicking a hidden button to trigger another "Ajax Submit" action. 


But below error i am getting while click on "Ok" button. Not sure what is the issues. If anybody have any idea about this type of issue and how to solve will be a great help.

Hi,

What actually do you want to achieve?

Financial Freedom wrote:

Hi,

What actually do you want to achieve?


Actually based on the 1st drop down selection we are trying to do an ajax call and set some data in server side. Once server responds we are trying to do an auto click which will get data for display. We have this old code for reporting. The screen i shown is just a small part of big report screen. Please let me know if any more info required.   

DO you mean that:

1. OK button is ajax submit

2. then Apply button is ajax submit ?

Financial Freedom wrote:

DO you mean that:

1. OK button is ajax submit

2. then Apply button is ajax submit ?

After click on Ok button other select drop down values should be updated. So while click on Ok we are getting the issue shown in the image. 


Hi, i did try with both buttons using ajax submit and the second one is hidden:

In the AJax1 action - use the id of the ajax2 widget for the widget_click (get from rich_widget, find in dependency):

And it works like a charm:

regards



Hello Deb188. 

Did you debug the error? 

If not, but a breakpoint at the start node of the action called by the OK button and check if it get to it or not. 

If it get, execute the code step by step until you find the problem. Could be different things depending on how your code is set. 

Cheers 

Eduardo Jauch wrote:

Hello Deb188. 

Did you debug the error? 

If not, but a breakpoint at the start node of the action called by the OK button and check if it get to it or not. 

If it get, execute the code step by step until you find the problem. Could be different things depending on how your code is set. 

Cheers 


Actually we are not getting the debug point so not able to trace. The moment we click the Ok we are getting connection reset error.

Financial Freedom wrote:

Hi, i did try with both buttons using ajax submit and the second one is hidden:

In the AJax1 action - use the id of the ajax2 widget for the widget_click (get from rich_widget, find in dependency):

And it works like a charm:

regards

We are also doing the similar kind of coding but for us it's not working.




Does this happen only on this button page? Other functionality works as expected? 

This error may indicate the IP is blocked by the server, for example. 

If you change the button method to Submit, it reaches the action? 

Cheers. 

Eduardo Jauch wrote:

Does this happen only on this button page? Other functionality works as expected? 

This error may indicate the IP is blocked by the server, for example. 

If you change the button method to Submit, it reaches the action? 

Cheers. 

Yes for if we change the button to Submit, it's working fine. But we need Ajax Submit for which we are getting the error.


And yes it's for the all page of the espace. Not specific for the button.


Recheck:

Financial Freedom wrote:

Recheck:



Sorry cannot help, could be there is a bug in older version.

Ask someone with the same version to try or upgrade the version.

regards

Hi Deb188, 

A last question. This happens on any espace, or if you create a new application and a new module, Ajax works OK? 

In any case, you probably will want to create a support ticket. 

If it is a platform Version problem (didn't hear about it) or something specific to your installation, Support will be able to help. 

Cheers 

Eduardo Jauch wrote:

Hi Deb188, 

A last question. This happens on any espace, or if you create a new application and a new module, Ajax works OK? 

In any case, you probably will want to create a support ticket. 

If it is a platform Version problem (didn't hear about it) or something specific to your installation, Support will be able to help. 

Cheers 

We are trying the same in different espace and getting same issue. But we do have some espace where ajax is working fine. Not sure what is the issue.


Hi, 

Whatever is the issue, is too broad. If your installation is on premises you can try to upgrade the platform, but I would stary by talking with OutSystems support. 

Cheers. 

Deb188, what else is on that page besides the dropdowns with buttons?

Do you perhaps have an iframe on there?

Could it be the widget you are trying to click on the widget_click doesn't exist? 

I have had this kind of problem when i hid my button widget in an If and after preparation it wasn't rendered. 

It would explain why the submit works...

You can try if it works when your button isn't hidden.