title: ASP.NET behaving strangely with Javascript
body: <p>I'm trying to modify displays and checkboxes from asp.net controls using javascript, cuz the updatepanel is just pure rubbish. But for some absurd reason, this works:</p>
  
  <pre><code>document.getElementById('ctl00_ctl00_MainContainer_WorkContainer_AppointmentFormView_RecurringRow').setAttribute('style', 'display: none');
  </code></pre>
  
  <p>and this does not:</p>
  
  <pre><code>document.getElementById('ctl00_ctl00_MainContainer_WorkContainer_AppointmentFormView_RecurringRow').style.display = 'none';
  </code></pre>
  
  <p>if i actually do it the second way, and i debug the value on display, it actually says none, but it's still visible in my UI. Weird stuff...</p>
  
  <p>The same goes with the checked value, if I set this:</p>
  
  <pre><code>document.getElementById('ctl00_ctl00_MainContainer_WorkContainer_AppointmentFormView_Monday').checked = false;
  </code></pre>
  
  <p>it just doesn't work, the only work around for this is to see if the value is actually checked and then click it, like this:</p>
  
  <pre><code>if (document.getElementById('ctl00_ctl00_MainContainer_WorkContainer_AppointmentFormView_Monday').checked) {
                      document.getElementById('ctl00_ctl00_MainContainer_WorkContainer_AppointmentFormView_Monday').click();
                  }
  </code></pre>
  
  <p>Any ideas of what i need to double check? because this is just not making any sense to me :)</p>