title: Hide and show in Javascript
body: <p>sorry for english.</p>
  
  <p>have dynamic radio buttons
  are working however, but I am new to javascript</p>
  
  <p>when you select one option Seems in another as I hide it? fix this?</p>
  
  <p>RADIOS: •YES •NO •OTHER </p>
  
  <p>and div hide...</p>
  
  <pre><code>&lt;div id="hide"&gt; FORM FOR YES &lt;/div&gt; 
  &lt;div id="hide2"&gt;FORM FOR OTHER &lt;/div&gt;
  </code></pre>
  
  <p><strong>when I select "yes" and then "other" are appearing as two divs can hide the div "hide". this only ever  if I select "yes" and then "oher".</strong>
      </p>
  
  <pre><code>window.onload=function(){
      document.getElementById('hide').style.display="none";
              document.getElementById('hide2').style.display="none";
  }
  
  function possui_dominio()
  {
  if(document.getElementsByName('form[dominio]')[0].checked)
  document.getElementById('hide').style.display="inline";
  
  if(document.getElementsByName('form[dominio]')[1].checked)
  document.getElementById('hide').style.display = 'none';
  document.getElementById('hide2').style.display = 'none';
  
  if(document.getElementsByName('form[dominio]')[2].checked)
  document.getElementById('hide2').style.display="inline";
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Thank you for those who help me, sorry for bad english.</p>