298
Views
6
Comments
Solved
Enable/Disable Properties using javascript
Question

I would like to make a function using javascript where after a single click in checkbox, it will disabled it and proceed to perform the OnChange function, then it will enable the checkbox.



2026-02-26 06-29-24
Rahul
 
MVP
Solution

Hi Gerald Emmanuel Malaca,

No need to create funtion here -

use simple in run javascrpit action.

 document.getElementById("myCheck").disabled = true;

document.getElementById("myCheck").disabled = false;


Regards

Rahul Sahu

UserImage.jpg
Gerald Emmanuel Malaca

Rahul Sahu wrote:

Hi Gerald Emmanuel Malaca,

No need to create funtion here -

use simple in run javascrpit action.

 document.getElementById("myCheck").disabled = true;

document.getElementById("myCheck").disabled = false;


Regards

Rahul Sahu

Hi sir,

this is the script that I modified based on your answer, but It still doesn't work

SyntaxEditor Code Snippet

"document.getElementById('" + CardTypeInclusionCheckBox.Id + "').disabled=false;" 


2026-02-26 06-29-24
Rahul
 
MVP

Gerald Emmanuel Malaca wrote:

Rahul Sahu wrote:

Hi Gerald Emmanuel Malaca,

No need to create funtion here -

use simple in run javascrpit action.

 document.getElementById("myCheck").disabled = true;

document.getElementById("myCheck").disabled = false;


Regards

Rahul Sahu

Hi sir,

this is the script that I modified based on your answer, but It still doesn't work

SyntaxEditor Code Snippet

"document.getElementById('" + CardTypeInclusionCheckBox.Id + "').disabled=false;" 


Hi

Can you share oml.

what error you get or checkbox is not disabled or not after onchange function


Regards

Rahul Sahu

UserImage.jpg
Gerald Emmanuel Malaca

Rahul Sahu wrote:

Gerald Emmanuel Malaca wrote:

Rahul Sahu wrote:

Hi Gerald Emmanuel Malaca,

No need to create funtion here -

use simple in run javascrpit action.

 document.getElementById("myCheck").disabled = true;

document.getElementById("myCheck").disabled = false;


Regards

Rahul Sahu

Hi sir,

this is the script that I modified based on your answer, but It still doesn't work

SyntaxEditor Code Snippet

"document.getElementById('" + CardTypeInclusionCheckBox.Id + "').disabled=false;" 


Hi

Can you share oml.

what error you get or checkbox is not disabled or not after onchange function


Regards

Rahul Sahu

Hi Sir,


Apologies, I tried it again and solve it was finally with the script I provided, I added a single quotation to solve it


and I used the the extended properties for the disabling  



Thank you 

2016-04-22 00-29-45
Nuno Reis
 
MVP

Hello Gerald.

Take a look at a similar discussion where you can see several alternatives. Long story short: better do the disable javascript on the button and the enable on the action.

https://www.outsystems.com/forums/discussion/47929/how-to-disable-button-after-single-click-in-outsystems/


2026-02-26 06-29-24
Rahul
 
MVP

Great. 

Yeh thats is another way to use Javascript.


Glad to help you


Regards

Rahul Sahu

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