Color not changing
Application Type

Hi Community,

I am working on UI using JavaScript.I have inserted few buttons and input widget in covid tracker screen

-All buttons color is changing but after again clicking on it it is not getting normal.

-In input widget I have used If condition in JS but the condition is getting false.

-I have also shared my .oml file



Can i ask why you want to use javascript?

I would create different classes in CSS and use the If in the Style Classes of the button.

For practise.

What do you want to prove with that test? 

Do you want to learn on how to use javascript in Outsystems?


I have no idea what you want with your code: if you expect it to return to normal, where do you have the code that does that?

Did you follow this guide?

Yes Sure, I'll go through the link.

After clicking on button color changes and if i click on that button again the color should go.

You need some sort of toggle function. since you wnat to do it in javascript, you should check it the background color is x, then change to y, if not change to x.

Hi Vinay,

I hope your are doing well!!

You can take reference of below link,

Kind Regards,

Ajit Kurane.

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