Xiongyi Gao Posted June 23, 2016 Share Posted June 23, 2016 Hi All, How can I change the background color for the input fields in the text area I tried to use HTML but it can only change font color. I didn't find any style attribute fortheSpotfireControl. Thanks. Link to comment Share on other sites More sharing options...
Andrew Berridge Posted June 23, 2016 Share Posted June 23, 2016 Hi There, Thanks for your question! This isn't possible using the style editor in Spotfire, but luckily you can use JavaScript... Edit the HTML and add a new JS script. Here's what I came up with - note you'll need to change the control's ID to match that of the Spotfire control in your text area: x = document.getElementsByTagName('INPUT'); for (i = 0; i < x.length; i++) { if (x.id == 'b6a6d3b851b54317ab3b99de4d7dfdd4') { x.style.backgroundColor = "yellow"; } }Hope that helps! Andrew (TIBCO Data Science) Link to comment Share on other sites More sharing options...
Xiongyi Gao Posted June 24, 2016 Author Share Posted June 24, 2016 Hi Andrew, Thank you, that's really helpful. Link to comment Share on other sites More sharing options...
Oliver Drummond Posted May 29, 2018 Share Posted May 29, 2018 That's great, Andrew! Thanks! By the way, I had to change a Inputfield (multiple lines)the only change I've made was from "INPUT" to "textarea". x = document.getElementsByTagName('textarea'); for (i = 0; i < x.length; i++) { if (x.id == '1371bbee2c1e4d7287a5574fe63f3618') { x.style.backgroundColor = "yellow"; } } Link to comment Share on other sites More sharing options...
Egor Kasprov Posted April 24, 2020 Share Posted April 24, 2020 Colleagues, Could you please advise which tagName could be implemented for DropDown property. instead "INPUT" x = document.getElementsByTagName('INPUT'); Also whit i in this script means x = document.getElementsByTagName('INPUT'); for (i = 0; i < x.length; i++) { if (x.id == 'b6a6d3b851b54317ab3b99de4d7dfdd4') { x.style.backgroundColor = "yellow"; } } thank you Link to comment Share on other sites More sharing options...
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