Chris Larsen 3 Posted July 8, 2019 Share Posted July 8, 2019 I'm trying to show/hide dropdown property controllers through a select tag and a js function in spotfire x. I want to avoid to refresh html area doing this. My code works fine until user select anything from spotfire dropdowns, after that user visualize properly only that item that he clicked on. Since that the other dropdowns appears "cutted" until a refresh of the page OPTION A OPTION B OPTION C OPTION D function showHide() { var x = document.getElementById("sel").value; if (x == 'a'){ document.getElementById("a").style.display = "block"; document.getElementById("b").style.display = "none"; document.getElementById("c").style.display = "none"; document.getElementById("d").style.display = "none"; } else if (x =='b') { document.getElementById("b").style.display = "block"; document.getElementById("a").style.display = "none"; document.getElementById("c").style.display = "none"; document.getElementById("d").style.display = "none"; }else if (x =='c') { document.getElementById("c").style.display = "block"; document.getElementById("a").style.display = "none"; document.getElementById("b").style.display = "none"; document.getElementById("d").style.display = "none"; }else if (x =='d') { document.getElementById("d").style.display = "block"; document.getElementById("a").style.display = "none"; document.getElementById("b").style.display = "none"; document.getElementById("c").style.display = "none"; } } Looking at html code behaviour from developer tools I noticed that when the bug occurs the ArrowContainer div of the cutted dropdowns changes its height and width attributes to 0px. 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