137
Views
5
Comments
Check box on change action is executed multiple times
Question

Hi,


I want my button to be enabled after my checkbox value is selected.

For this I have written screen action to refresh button widget setting its enabled to the boolean value from check box


 My screen action looks like this



My problem is that once the ajax refresh happens this screen action is executed again with the boolean now set to false.

As a result the button is enabled for a sec and is disabled again.

Please assist. I cannot understand why this action is executed multiple times

2025-04-22 05-54-18
Shashi Kant Shukla

Hi Ankit,

Actually on the checkbox you are double clicking that`s why your action is calling 2 times.

There are two solutions:

1. Click single time on checkbox

2. Write some jqury script to disable double click event on checkbox.


Regards

SK

2016-06-29 09-25-29
Thomas Robinson

Hi Ankit,

I can't reproduce your situation so I will tell you what I did (it's working :) ):

  1. I added a button to the screen and named it (it  must be named so I can use it on the Ajax widget later);
  2. Created a boolean var in the screen and then assign its value to the "Enabled" property of the button created in step 1;
  3. Added a checkbox to the screen, assigned the var created in the step above to the "Variable" property and an action to the "On Change" event where I put a "Ajax Refresh" widget refreshing my button.

I've attached the oml so you can inspect the code.

Regards,
Thomas

ButtonStateChanging.oml
UserImage.jpg
ankit sharma

Thomas Robinson wrote:

Hi Ankit,

I can't reproduce your situation so I will tell you what I did (it's working :) ):

  1. I added a button to the screen and named it (it  must be named so I can use it on the Ajax widget later);
  2. Created a boolean var in the screen and then assign its value to the "Enabled" property of the button created in step 1;
  3. Added a checkbox to the screen, assigned the var created in the step above to the "Variable" property and an action to the "On Change" event where I put a "Ajax Refresh" widget refreshing my button.

I've attached the oml so you can inspect the code.

Regards,
Thomas

Hi Thomas,


Thanks for the feedback.

I am still struggling to make it work .

Shall try some other way and let you know .

Regards

Ankit


2025-04-22 05-54-18
Shashi Kant Shukla

Ankit,

I am guessing it may be problem of your mouse at the time of single click it is clicking twice(double click).

Please check with some other system because at my side there are no issue.


Regards

SK


UserImage.jpg
ankit sharma

Sahshi kant Shukla wrote:

Ankit,

I am guessing it may be problem of your mouse at the time of single click it is clicking twice(double click).

Please check with some other system because at my side there are no issue.


Regards

SK


Hi Sahshi,

Thanks for the feedback .

I'll check and let you know.

Best Regards

Ankit Sharma


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