Object Required Error from Javascript
<p>In my aspx page, I have two radio buttons and a table.. if one of the radio buttons is checked it should make the table visible if the other one is checked invisible.. but this line is giving me a "JS Object Required". I am firing this from code behind .cs.. it fires fine but then i get that error.</p>

<pre><code> document.getElementById('tblnewpackinglogo').style.display = ''; 
</code></pre>

<p>See code below</p>

<p>JAVASCRIPT</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;
    function ShowImage() {
        var rdoImg = document.getElementById("&lt;%=radImage.ClientID%&gt;");
        if (rdoCurrImage2.checked == true) {
            document.getElementById('tblnewpackinglogo').style.display = 'none';
        }
        else {
            document.getElementById('tblnewpackinglogo').style.display = '';
        }
    }
&lt;/script&gt;
</code></pre>

<p>TABLES</p>

<pre><code>   &lt;table id="tblImage" border="0" cellpadding="0" cellspacing="10" runat="server"
    visible="true"&gt;
         &lt;tr&gt;
             &lt;td&gt;
               &lt;asp:Image ID="imgLogo" runat="server" /&gt;
             &lt;/td&gt;
          &lt;td&gt;
    &lt;div class="FieldStyle"&gt;
           Select an Option&lt;/div&gt;
                     &amp;nbsp;
         &lt;asp:RadioButton ID="radImage" 
              Text="Keep Current Image" 
              runat="server" 
              GroupName="LogoImage"
              OnCheckedChanged="radImage_CheckedChanged" 
              Checked="True" /&gt;

         &lt;asp:RadioButton ID="radNewImage" 
              Text="Upload New Image" runat="server" 
              GroupName="LogoImage"
              OnCheckedChanged="radNewImage_CheckedChanged" /&gt;
         &lt;/td&gt;
      &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;
           &amp;nbsp;
             &lt;/td&gt;
           &lt;/tr&gt;
     &lt;/table&gt;
     &lt;table id="tblnewpackinglogo" border="0" cellpadding="0" cellspacing="0" width="100%"
      runat="server" style="display:none;"&gt;
           &lt;tr&gt;
           &lt;td style="height: 41px"&gt;
                  &lt;div class="Style"&gt;
                        Select a Logo Image&lt;/div&gt;
                &lt;div class="ValueStyle"&gt;
                     &lt;asp:FileUpload ID="UploadImage" 
                          runat="server" 
                          Width="300px" /&gt;
                             &lt;/div&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
</code></pre>
