client side validation error
<pre><code>&lt;%@ Page Language="C#" MasterPageFile="~/HomeMaster.master" AutoEventWireup="true" CodeFile="HomePage.aspx.cs" Inherits="Default2" Title="Untitled Page" %&gt;

&lt;asp:Content ID="Content1" ContentPlaceHolderID="cp1" Runat="Server"&gt;

&lt;script language="javascript" type="text/javascript"&gt;
    function checkInput()  
{  
  var uname = document.getElementById("txtUName").value;  
  var pwd = document.getElementById("txtPWord").value;  
  var counter=0;  
  if(uname.length==0) counter++;  
  if(pwd.length==0) counter++;  
  if(counter &gt; 0)  
   {
   document.getElementById("dvError").innerHTML = "user name or password can not be blank" ;
        // alert("blank field");  

      return false;
    }
   return true; 
   }  


    &lt;/script&gt;
   &lt;div id="dvError"  style="height: 102px; color:Red; "  &gt;&lt;/div&gt;


**on button click::**
&lt;asp:Button ID="btnSin" runat="server" Text="SignIn" OnClientClick="return checkInput()" onclick="btnSin_Click" /&gt;
</code></pre>

<p><em>then i got an error::</em>
<strong>Microsoft JScript runtime error: Object required</strong></p>
