= IF(yourconditionhere, "Clicked", "NotClicked") To apply conditional class to an element (in web), you can use the Extended Properties of the element, like this: class Than, when you click and call the action, you just change the condition and ajax refresh the buttons. You can associate to the button a conditional class, that defines, through CSS, its color. If this is true, you would be better (in terms of maintenance of the application, at least), not relying on JavaScript. I would say that when you click a button, you are doing something, like calling an action, right? You will have to repeat this script on all button clicks with tweaks in color. Synta圎ditor Code Snippet "document.getElementById('"+Id-of-button-1+"').style.backgroundColor='#004a80' //Changes BG to Blueĭocument.getElementById('"+Id-of-button-1+"').lor='white' //Changes Text to Whiteĭocument.getElementById('"+Id-of-button-2+"').lor='#004a80' //Changes Text to Blueĭocument.getElementById('"+Id-of-button-2+"').style.backgroundColor='white' //Changes BG - Whiteĭocument.getElementById('"+Id-of-button-3+"').lor='#004a80' ĭocument.getElementById('"+Id-of-button-3+"').style.backgroundColor='white' ĭocument.getElementById('"+Id-of-button-4+"').lor='#004a80' ĭocument.getElementById('"+Id-of-button-4+"').lor='white'
If you are wondering how to download Mozilla Firefox for Windows 10 PC (32 bit or 64 bit), below is a Firefox download and install guide. On Click of button Add a Screen Action with Ajax Refresh and add a Run Java Script Action from HTTPRequestHandler. Firefox is also a popular browser well-received by many people. I have 4 buttons all of the white color and I want to change the color of the clicked button to orange and change the color of a previously selected button to white color
Thanks for the reply but how should I do it with Javascript