Q:

Display:none does not seem to be working all html elements

I am trying to make this part of the form disappear by putting it in a div and the id = loan
To troubleshoot I put TESTTEXT1 in after the div element, and it does what I want (disappears when user clicks a radio button),However TESTTEST2 and beyond does not seem to be affected by the user's action. Does anyone know why this could be?
HTML:

<header>


<script>
 function checkA(){
 document.getElementById('loan').style.display='none';
 document.getElementById('assigned').style.display='block';
  }
function checkL(){
 document.getElementById('assigned').style.display='none';
 document.getElementById('loan').style.display='block';
}
</script> 

</header>

<body>

<table>
<td>
  <input type="radio" onclick='checkA()' name="toloan" id="0" value="0"/> <label for="0">To assign</label>
  <input type="radio" onclick='checkL()' name="toloan" id="1" value="1"/> <label for="1">To loan</label>
</td>


<div id="loan">
  TESTTEXT1
  <tr>
    <th>
      <label for="borrowing_month">Borrowing date</label>
    </th>
    <td>
      <select name="borrowing_month" id="borrowing_month">
        
          <option value ='1' selected="selected">
            TEST
          </option>
       </select>
      <select name="borrowing_day" id="borrowing_day">
        
          <option value="2" selected="selected">
      </select>
      <select name="borrowing_year" id="borrowing_year">
          <option value="3" selected="selected">
      </select>
    </td>
  </tr>
  <tr>
    <th>
      <label for="return_month">Return date</label>
    </th>
    <td>
      <select name="return_month" id="return_month">
          <option value="4" selected="selected">
          </option>
      </select>
      <select name="return_day" id="return_day">
          <option value="5" selected="selected">
      </select>
      <select name="return_year" id="return_year">
          <option value="6" selected="selected">
      </select>
    </td>
  </tr>
</div>

</table>
</body>



OK I tried to remove all the php as requested.

A:

As @DanielBeck points out, there is no table-wrapper, so I would try changing the <div id="loan"> to <table id="loan">.
You'll have to change the closing tag from </div> to </table>, of course, and it will change your javascript a little:
function checkA() {
  document.getElementById('loan').style.display = 'none';
  document.getElementById('assigned').style.display = 'table';
}

function checkL() {
  document.getElementById('assigned').style.display = 'none';
  document.getElementById('loan').style.display = 'table';
}

