gridview.getElementsByTagName("input") is giving Inputs Zero Why?
<pre><code>&lt;script language="javascript" type="text/javascript"&gt;
    function ValidateNew() {

        var gridview = document.getElementById('ctl00_cp_GridViewKRIlib');

        if (gridview != null) {

            var Inputs = gridview.getElementsByTagName("input");

            for (i = 0; i &lt; Inputs.length; i++) {

                if (Inputs[i].type == 'text') {

                    if (Inputs[i].value == "") {
                        alert('Enter the value!');
                        Inputs[i].focus();
                        return false;
                    }
                }
            }
        }
    }
</code></pre>

<p>i am calling this funtion in </p>

<pre><code>&lt;asp:TemplateField HeaderText="Edit"&gt;
&lt;ItemTemplate&gt;

&lt;asp:LinkButton ID="linkbuttonNew" runat="server" Text="New" CommandName="New" CommandArgument='&lt;%#Container.DataItemIndex%&gt;'
OnClientClick="javascript:return ValidateNew();"&gt;
&lt;/asp:LinkButton&gt;
</code></pre>

<p>INPUTS Are Showing zero Why?</p>
