Guys, such a question, there is a settings page, there is a CheckBox and it is necessary that when the flag is on the table is displayed on the page (this is now the case), but when the flag is removed, it is necessary that this table disappear / freeze. How can this be implemented logically?

    1 answer 1

    This can be done in javascipt, not using GWT or Java

    checkbox in html

    <input type="checkbox" name="c1" onclick="showMe('div1')">Show Hide Checkbox

    js function that hides / shows the table

     function showMe (box) { var chboxs = document.getElementsByName("c1"); var vis = "none"; for(var i=0;i<chboxs.length;i++) { if(chboxs[i].checked){ vis = "block"; break; } } document.getElementById(box).style.display = vis; } 
    • Thanks for the answer, but the tech stack does not allow you to use js, but I think thanks to your answer I will write for myself. Thank you - Arkadiy Bodriy
    • Well, gwt generates javascipt on the side of java, so it seems to me that there is nothing criminal in using javascipt in its pure form - cadmy
    • of course, if the table is constantly being updated and the heavy one needs to think about some more optimal solution - cadmy
    • one
      I’m not the only one who works , the project is big and if anyone touches this topic there they break their leg - Arkadiy Bodriy