Ramya Sk Posted May 21, 2020 Posted May 21, 2020 I want to change background color of a table in text area using the property defined. That is the property value will change at runtime. Everytime when the text area is refreshed it should have the latest background color for the table
Shashank Gurnalkar Posted May 22, 2020 Posted May 22, 2020 You can refer to the following article to access theDocument Property control values in Text Area. https://support.tibco.com/s/article/How-to-access-Text-Area-Document-Property-control-values-using-Java-Script-JQuery
Ramya Sk Posted May 24, 2020 Author Posted May 24, 2020 var list1=["a","b","c"] var list2=["d","e"] var tableid= document.getElementById('tableid'); var name= document.getElementById('name'+).textContent; if(list1.indexOf(String(name).trim())>-1) { if(tableid !=null) { tableid.style="color: ADFF2F; background-color:ADFF2F" } } else if(list2.indexOf(String(name).trim())>-1) { if(tableid !=null) { tableid.style="color: #DAA520; background-color:#DAA520" } }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now